X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fpawns.cpp;h=88c63ce3a3d4ad518720d887cdb7fab974f92b16;hp=5a5ebb5d1ffa127f897abcb066086ac15269318f;hb=1d1b7df7c6b3496d1a3fe926cadf25d91e1558f6;hpb=13b9e1e09811560d0120a8586c7418fb3640d626 diff --git a/src/pawns.cpp b/src/pawns.cpp index 5a5ebb5d..88c63ce3 100644 --- a/src/pawns.cpp +++ b/src/pawns.cpp @@ -278,7 +278,7 @@ template Score Entry::update_safety(const Position& pos, Square ksq) { kingSquares[Us] = ksq; - castlingFlags[Us] = pos.can_castle(Us); + castlingRights[Us] = pos.can_castle(Us); minKPdistance[Us] = 0; Bitboard pawns = pos.pieces(Us, PAWN); @@ -291,10 +291,10 @@ Score Entry::update_safety(const Position& pos, Square ksq) { Value bonus = shelter_storm(pos, ksq); // If we can castle use the bonus after the castling if it is bigger - if (pos.can_castle(MakeCastling::flag)) + if (pos.can_castle(MakeCastling::right)) bonus = std::max(bonus, shelter_storm(pos, relative_square(Us, SQ_G1))); - if (pos.can_castle(MakeCastling::flag)) + if (pos.can_castle(MakeCastling::right)) bonus = std::max(bonus, shelter_storm(pos, relative_square(Us, SQ_C1))); return kingSafety[Us] = make_score(bonus, -16 * minKPdistance[Us]);