X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fposition.h;h=5a4c594df8e3d7055f196ed430cd1fd1f9320aeb;hp=d2343d10cb8507adc2d1732dbb980826edb8efb0;hb=378bcfe7602593b28ceee5feabbe77b20266a195;hpb=fe2ed426614f729435338f0d7451f7b0d5fe30dd diff --git a/src/position.h b/src/position.h index d2343d10..5a4c594d 100644 --- a/src/position.h +++ b/src/position.h @@ -193,7 +193,7 @@ private: // Helper functions void do_castle(Square kfrom, Square kto, Square rfrom, Square rto); - template Bitboard hidden_checkers() const; + Bitboard hidden_checkers(Square ksq, Color c) const; // Computing hash keys from scratch (for initialization and debugging) Key compute_key() const; @@ -331,11 +331,11 @@ inline Bitboard Position::checkers() const { } inline Bitboard Position::discovered_check_candidates() const { - return hidden_checkers(); + return hidden_checkers(king_square(~sideToMove), sideToMove); } inline Bitboard Position::pinned_pieces() const { - return hidden_checkers(); + return hidden_checkers(king_square(sideToMove), ~sideToMove); } inline bool Position::pawn_is_passed(Color c, Square s) const {