X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fpawns.cpp;h=c9c9e5992dbaf83cca00876317e3c3d9456647a1;hp=b0fcfad331d732ed8786b9de747824495006d0ee;hb=c8589903777b6e0289640b43fae966ded442af48;hpb=7133598a98301cf84857d39194026b876da48b96 diff --git a/src/pawns.cpp b/src/pawns.cpp index b0fcfad3..c9c9e599 100644 --- a/src/pawns.cpp +++ b/src/pawns.cpp @@ -18,7 +18,6 @@ along with this program. If not, see . */ -#include #include #include "bitboard.h" @@ -118,7 +117,7 @@ namespace { && popcount(phalanx) >= popcount(leverPush)) e->passedPawns[Us] |= s; - else if ( stoppers == SquareBB[s + Up] + else if ( stoppers == square_bb(s + Up) && relative_rank(Us, s) >= RANK_5) { b = shift(support) & ~theirPawns; @@ -208,7 +207,7 @@ Value Entry::evaluate_shelter(const Position& pos, Square ksq) { Value safety = (shift(theirPawns) & (FileABB | FileHBB) & BlockRanks & ksq) ? Value(374) : Value(5); - File center = std::max(FILE_B, std::min(FILE_G, file_of(ksq))); + File center = clamp(file_of(ksq), FILE_B, FILE_G); for (File f = File(center - 1); f <= File(center + 1); ++f) { b = ourPawns & file_bb(f);