]> git.sesse.net Git - stockfish/blobdiff - src/endgame.cpp
Corrects a functional change in a cleanup patch.
[stockfish] / src / endgame.cpp
index 40f49dce5018d08aaffd60468fd60e6a195a1021..a8ceb648776e42580e1d7ae788f1973c017ccc2b 100644 (file)
@@ -589,8 +589,8 @@ ScaleFactor Endgame<KPsK>::operator()(const Position& pos) const {
   Bitboard strongPawns = pos.pieces(strongSide, PAWN);
 
   // If all pawns are ahead of the king on a single rook file, it's a draw.
   Bitboard strongPawns = pos.pieces(strongSide, PAWN);
 
   // If all pawns are ahead of the king on a single rook file, it's a draw.
-  if (!((strongPawns & ~FileABB) || (strongPawns & ~FileHBB)) &&
-      !(strongPawns & ~passed_pawn_span(weakSide, weakKing)))
+  if (   !(strongPawns & ~(FileABB | FileHBB))
+      && !(strongPawns & ~passed_pawn_span(weakSide, weakKing)))
       return SCALE_FACTOR_DRAW;
 
   return SCALE_FACTOR_NONE;
       return SCALE_FACTOR_DRAW;
 
   return SCALE_FACTOR_NONE;