X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fendgame.cpp;h=94967c25eac588043e0730eabc2c0da5a4a16745;hp=572c160d42ba60c018a64bfbe13ed4c4403f42a1;hb=5f12069cbfc882fdf989d04618ad9c33e603c419;hpb=d0587f2c7f31ea30885007beca76e832b8713501 diff --git a/src/endgame.cpp b/src/endgame.cpp index 572c160d..94967c25 100644 --- a/src/endgame.cpp +++ b/src/endgame.cpp @@ -240,7 +240,7 @@ Value Endgame::operator()(const Position& pos) const { Square rsq = relative_square(strongSide, pos.list(strongSide)[0]); Square psq = relative_square(strongSide, pos.list(weakSide)[0]); - Square queeningSq = file_of(psq) | RANK_1; + Square queeningSq = make_square(file_of(psq), RANK_1); Value result; // If the stronger side's king is in front of the pawn, it's a win @@ -371,7 +371,7 @@ ScaleFactor Endgame::operator()(const Position& pos) const { && !(pawns & ~file_bb(pawnFile))) { Square bishopSq = pos.list(strongSide)[0]; - Square queeningSq = relative_square(strongSide, pawnFile | RANK_8); + Square queeningSq = relative_square(strongSide, make_square(pawnFile, RANK_8)); Square kingSq = pos.king_square(weakSide); if ( opposite_colors(queeningSq, bishopSq) @@ -463,7 +463,7 @@ ScaleFactor Endgame::operator()(const Position& pos) const { File f = file_of(wpsq); Rank r = rank_of(wpsq); - Square queeningSq = f | RANK_8; + Square queeningSq = make_square(f, RANK_8); int tempo = (pos.side_to_move() == strongSide); // If the pawn is not too far advanced and the defending king defends the @@ -721,12 +721,12 @@ ScaleFactor Endgame::operator()(const Position& pos) const { if (relative_rank(strongSide, psq1) > relative_rank(strongSide, psq2)) { blockSq1 = psq1 + pawn_push(strongSide); - blockSq2 = file_of(psq2) | rank_of(psq1); + blockSq2 = make_square(file_of(psq2), rank_of(psq1)); } else { blockSq1 = psq2 + pawn_push(strongSide); - blockSq2 = file_of(psq1) | rank_of(psq2); + blockSq2 = make_square(file_of(psq1), rank_of(psq2)); } switch (file_distance(psq1, psq2))