X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fpawns.h;h=df220eabbe9433fffad3dc47577446e49bbf84df;hp=5129df030c764c99132c6046e9f8fd6ca09d1ed3;hb=085b48db7432211103ebdac880a785e6439ca338;hpb=68209c9121b54760f03e5f00d6698bca190706ed diff --git a/src/pawns.h b/src/pawns.h index 5129df03..df220eab 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 @@ -51,7 +51,7 @@ struct Entry { template Score king_safety(const Position& pos) { - return kingSquares[Us] == pos.square(Us) && castlingRights[Us] == pos.can_castle(Us) + return kingSquares[Us] == pos.square(Us) && castlingRights[Us] == pos.castling_rights(Us) ? kingSafety[Us] : (kingSafety[Us] = do_king_safety(pos)); }