X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fpawns.cpp;h=98e13f8373af1b8d6d9827d1f4ea667027d40a8d;hp=36b10f32f6e1606a91f69bda1964bda11a51b4cb;hb=68209c9121b54760f03e5f00d6698bca190706ed;hpb=30a905c95d0b77874244c8b68ae77daba41ac545 diff --git a/src/pawns.cpp b/src/pawns.cpp index 36b10f32..98e13f83 100644 --- a/src/pawns.cpp +++ b/src/pawns.cpp @@ -237,8 +237,9 @@ Value Entry::evaluate_shelter(const Position& pos, Square ksq) { /// when king square changes, which is about 20% of total king_safety() calls. template -Score Entry::do_king_safety(const Position& pos, Square ksq) { +Score Entry::do_king_safety(const Position& pos) { + Square ksq = pos.square(Us); kingSquares[Us] = ksq; castlingRights[Us] = pos.can_castle(Us); int minKingPawnDistance = 0; @@ -260,7 +261,7 @@ Score Entry::do_king_safety(const Position& pos, Square ksq) { } // Explicit template instantiation -template Score Entry::do_king_safety(const Position& pos, Square ksq); -template Score Entry::do_king_safety(const Position& pos, Square ksq); +template Score Entry::do_king_safety(const Position& pos); +template Score Entry::do_king_safety(const Position& pos); } // namespace Pawns