Skip to content

Commit 9ca014d

Browse files
committed
Fix a compilation error for MSVC
The previous commit wouldn't compile on the Microsoft Virtual Studio C++ compiler. So use a more compatible style for the same idea (which we already use in numerous places of evaluate.cpp, for instance in line 563). Under the Clang compiler, both versions generate exactly the same machine code (same md5 signatures for the two binaries). No functional change.
1 parent e12fc10 commit 9ca014d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/evaluate.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -636,8 +636,8 @@ namespace {
636636

637637
assert(!(pos.pieces(Them, PAWN) & forward_file_bb(Us, s + Up)));
638638

639-
bb = forward_file_bb(Us, s) & pos.pieces(Them);
640-
score -= HinderPassedPawn * bool(bb);
639+
if (forward_file_bb(Us, s) & pos.pieces(Them))
640+
score -= HinderPassedPawn;
641641

642642
int r = relative_rank(Us, s);
643643
int w = PassedDanger[r];

0 commit comments

Comments
 (0)