X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fpawns.h;h=4d8b293664d6cabd176162a233189363a1f59d0a;hp=ec926a42ba669bc073a34ba66e134c7b2b5d6dec;hb=97d2122c53f75a74d4c8ab35e36378e3854773d9;hpb=c794c8c8016dfdc8360c9d5ab74dffa9d93d9277 diff --git a/src/pawns.h b/src/pawns.h index ec926a42..4d8b2936 100644 --- a/src/pawns.h +++ b/src/pawns.h @@ -2,7 +2,7 @@ Stockfish, a UCI chess playing engine derived from Glaurung 2.1 Copyright (C) 2004-2008 Tord Romstad (Glaurung author) Copyright (C) 2008-2015 Marco Costalba, Joona Kiiski, Tord Romstad - Copyright (C) 2015-2018 Marco Costalba, Joona Kiiski, Gary Linscott, Tord Romstad + Copyright (C) 2015-2019 Marco Costalba, Joona Kiiski, Gary Linscott, Tord Romstad Stockfish is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -50,13 +50,13 @@ struct Entry { } template - Score king_safety(const Position& pos, Square ksq) { - return kingSquares[Us] == ksq && castlingRights[Us] == pos.can_castle(Us) - ? kingSafety[Us] : (kingSafety[Us] = do_king_safety(pos, ksq)); + Score king_safety(const Position& pos) { + return kingSquares[Us] == pos.square(Us) && castlingRights[Us] == pos.can_castle(Us) + ? kingSafety[Us] : (kingSafety[Us] = do_king_safety(pos)); } template - Score do_king_safety(const Position& pos, Square ksq); + Score do_king_safety(const Position& pos); template Value evaluate_shelter(const Position& pos, Square ksq);