From 6a6dadb5a63c1d62735b6ce6d7747ee56dc4680b Mon Sep 17 00:00:00 2001 From: Torsten Hellwig Date: Tue, 26 Aug 2025 10:30:33 +0200 Subject: [PATCH] Remove buggy and unused function The function does not fulfill its purpose and is not used anywhere. See https://discord.com/channels/435943710472011776/1101022188313772083/1409801409855094874 closes https://github.com/official-stockfish/Stockfish/pull/6275 no functional change --- src/position.h | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/position.h b/src/position.h index cf6b1c472..56bb7b5a4 100644 --- a/src/position.h +++ b/src/position.h @@ -103,10 +103,9 @@ class Position { Square square(Color c) const; // Castling - CastlingRights castling_rights(Color c) const; - bool can_castle(CastlingRights cr) const; - bool castling_impeded(CastlingRights cr) const; - Square castling_rook_square(CastlingRights cr) const; + bool can_castle(CastlingRights cr) const; + bool castling_impeded(CastlingRights cr) const; + Square castling_rook_square(CastlingRights cr) const; // Checking Bitboard checkers() const; @@ -248,10 +247,6 @@ inline Square Position::ep_square() const { return st->epSquare; } inline bool Position::can_castle(CastlingRights cr) const { return st->castlingRights & cr; } -inline CastlingRights Position::castling_rights(Color c) const { - return c & CastlingRights(st->castlingRights); -} - inline bool Position::castling_impeded(CastlingRights cr) const { assert(cr == WHITE_OO || cr == WHITE_OOO || cr == BLACK_OO || cr == BLACK_OOO); return pieces() & castlingPath[cr];