X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fpawns.cpp;h=5a5ebb5d1ffa127f897abcb066086ac15269318f;hp=f767f6dbcbf442af1b4455ff01571f093a8bc8cf;hb=708cb311a040ca8c676524025c9d72ed4c632267;hpb=3e5470d88fdcbfd4f3e7f773160961c3bca45ab9 diff --git a/src/pawns.cpp b/src/pawns.cpp index f767f6db..5a5ebb5d 100644 --- a/src/pawns.cpp +++ b/src/pawns.cpp @@ -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(make_castling_flag(Us, KING_SIDE))) + if (pos.can_castle(MakeCastling::flag)) bonus = std::max(bonus, shelter_storm(pos, relative_square(Us, SQ_G1))); - if (pos.can_castle(make_castling_flag(Us, QUEEN_SIDE))) + if (pos.can_castle(MakeCastling::flag)) bonus = std::max(bonus, shelter_storm(pos, relative_square(Us, SQ_C1))); return kingSafety[Us] = make_score(bonus, -16 * minKPdistance[Us]);