X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fendgame.cpp;h=38c322afc7dbb1a2214c711b1f7cd6a6f56fe569;hp=618113904afe096c87ee3c56378b7fd0ac330628;hb=8765f9ce168b129b3283fc1e458eae2f8871b1d4;hpb=c0bb0415394179e9c771cc96a9da6724fc14c167 diff --git a/src/endgame.cpp b/src/endgame.cpp index 61811390..38c322af 100644 --- a/src/endgame.cpp +++ b/src/endgame.cpp @@ -652,17 +652,15 @@ ScaleFactor Endgame::operator()(const Position& pos) const { if (relative_rank(strongSide, pawnSq) <= RANK_5) return SCALE_FACTOR_DRAW; - else - { - Bitboard path = forward_bb(strongSide, pawnSq); + + Bitboard path = forward_bb(strongSide, pawnSq); - if (path & pos.pieces(weakSide, KING)) - return SCALE_FACTOR_DRAW; + if (path & pos.pieces(weakSide, KING)) + return SCALE_FACTOR_DRAW; - if ( (pos.attacks_from(weakBishopSq) & path) - && distance(weakBishopSq, pawnSq) >= 3) - return SCALE_FACTOR_DRAW; - } + if ( (pos.attacks_from(weakBishopSq) & path) + && distance(weakBishopSq, pawnSq) >= 3) + return SCALE_FACTOR_DRAW; } return SCALE_FACTOR_NONE; }