Remove redundant king square parameter

We don't need to pass the king square as an explicit parameter to the functions
king_safety() and do_king_safety() since we already pass in the position.

STC:
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 69686 W: 14894 L: 14866 D: 39926
http://tests.stockfishchess.org/tests/view/5be84ac20ebc595e0ae3283c

No functional change.
This commit is contained in:
mstembera
2018-11-10 19:49:13 -08:00
committed by Stéphane Nicolet
parent 30a905c95d
commit 68209c9121
3 changed files with 9 additions and 8 deletions
+4 -4
View File
@@ -50,13 +50,13 @@ struct Entry {
}
template<Color Us>
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<Us>(pos, ksq));
Score king_safety(const Position& pos) {
return kingSquares[Us] == pos.square<KING>(Us) && castlingRights[Us] == pos.can_castle(Us)
? kingSafety[Us] : (kingSafety[Us] = do_king_safety<Us>(pos));
}
template<Color Us>
Score do_king_safety(const Position& pos, Square ksq);
Score do_king_safety(const Position& pos);
template<Color Us>
Value evaluate_shelter(const Position& pos, Square ksq);