]> git.sesse.net Git - stockfish/commitdiff
Fix overload ambiguity
authorStéphane Nicolet <cassio@free.fr>
Sun, 3 Jun 2018 07:18:18 +0000 (09:18 +0200)
committerStéphane Nicolet <cassio@free.fr>
Sun, 3 Jun 2018 07:19:13 +0000 (09:19 +0200)
Fix an error when compiling current master with MSVC due to the
ambiguity of which operator* overload was intended (reported by
Jarrod Torriero).

No functional change.

src/search.cpp

index 220bf55f9beac657f10dd69eec43e0416454ea28..4e6358c0d804f91fd6e8b038ec33e8c605b3e739 100644 (file)
@@ -1167,7 +1167,7 @@ moves_loop: // When in check, search starts from here
             update_quiet_stats(pos, ss, bestMove, quietsSearched, quietCount, stat_bonus(depth));
         else
             update_capture_stats(pos, bestMove, capturesSearched, captureCount,
-                                 stat_bonus(depth + bool(bestValue > beta + KnightValueMg) * ONE_PLY));
+                                 stat_bonus(depth + (bestValue > beta + KnightValueMg ? ONE_PLY : DEPTH_ZERO)));
 
         // Extra penalty for a quiet TT move in previous ply when it gets refuted
         if ((ss-1)->moveCount == 1 && !pos.captured_piece())