projects
/
fairystockfish.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
b255986
)
Fix MSVC error
author
Fabian Fichter
<ianfab@users.noreply.github.com>
Sat, 15 Dec 2018 17:02:24 +0000 (18:02 +0100)
committer
Fabian Fichter
<ianfab@users.noreply.github.com>
Sat, 15 Dec 2018 17:05:40 +0000 (18:05 +0100)
Explicitly capture compile-time variable in lambda expression.
No function change.
src/evaluate.cpp
patch
|
blob
|
history
diff --git
a/src/evaluate.cpp
b/src/evaluate.cpp
index
7bebf7a
..
ce42ebc
100644
(file)
--- a/
src/evaluate.cpp
+++ b/
src/evaluate.cpp
@@
-469,7
+469,7
@@
namespace {
safe = ~pos.pieces(Them);
safe &= ~attackedBy[Us][ALL_PIECES] | (weak & attackedBy2[Them]);
- std::function <Bitboard (PieceType)> get_attacks = [this](PieceType pt) {
+ std::function <Bitboard (PieceType)> get_attacks = [this, Them](PieceType pt) {
return attackedBy[Them][pt] | (pos.captures_to_hand() && pos.count_in_hand(Them, pt) ? ~pos.pieces() : 0);
};
for (PieceType pt : pos.piece_types())