]> git.sesse.net Git - stockfish/blobdiff - src/position.h
Unify pinned and discovery checks code
[stockfish] / src / position.h
index 5ae75655658fc69276391a6aafcf4b5d02453c45..f77b368abb0cebf74dc7373d9cee8ae55a38d523 100644 (file)
@@ -197,8 +197,6 @@ public:
   // Bitboards for pinned pieces and discovered check candidates
   Bitboard discovered_check_candidates(Color c) const;
   Bitboard pinned_pieces(Color c) const;
   // Bitboards for pinned pieces and discovered check candidates
   Bitboard discovered_check_candidates(Color c) const;
   Bitboard pinned_pieces(Color c) const;
-  template<PieceType Piece>
-  Bitboard pinned_pieces(Color c, Square ksq) const;
 
   // Checking pieces
   Bitboard checkers() const;
 
   // Checking pieces
   Bitboard checkers() const;
@@ -307,6 +305,9 @@ private:
   void undo_ep_move(Move m);
   void find_checkers();
 
   void undo_ep_move(Move m);
   void find_checkers();
 
+  template<PieceType Piece, bool FindPinned>
+  Bitboard hidden_checks(Color c, Square ksq) const;
+
   // Computing hash keys from scratch (for initialization and debugging)
   Key compute_key() const;
   Key compute_pawn_key() const;
   // Computing hash keys from scratch (for initialization and debugging)
   Key compute_key() const;
   Key compute_pawn_key() const;