From 9ca014df497de8b3fa4a1da75e8af8a567141a90 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Ste=CC=81phane=20Nicolet?= Date: Fri, 27 Jul 2018 15:46:13 +0200 Subject: [PATCH] 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. --- src/evaluate.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/evaluate.cpp b/src/evaluate.cpp index 5f4a1ab1..55ceadfd 100644 --- a/src/evaluate.cpp +++ b/src/evaluate.cpp @@ -636,8 +636,8 @@ namespace { assert(!(pos.pieces(Them, PAWN) & forward_file_bb(Us, s + Up))); - bb = forward_file_bb(Us, s) & pos.pieces(Them); - score -= HinderPassedPawn * bool(bb); + if (forward_file_bb(Us, s) & pos.pieces(Them)) + score -= HinderPassedPawn; int r = relative_rank(Us, s); int w = PassedDanger[r]; -- 2.39.2