X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fpawns.h;h=4d8b293664d6cabd176162a233189363a1f59d0a;hp=f36168c9a7db884cea5b170972978feb1fdf8271;hb=97d2122c53f75a74d4c8ab35e36378e3854773d9;hpb=67f5f54a29b5d5d2bd9e43bfcc3a95bcc142d664 diff --git a/src/pawns.h b/src/pawns.h index f36168c9..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,16 +50,16 @@ 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 shelter_storm(const Position& pos, Square ksq); + Value evaluate_shelter(const Position& pos, Square ksq); Key key; Score scores[COLOR_NB];