mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-23 10:36:26 +08:00
Small cleanups
closes https://github.com/official-stockfish/Stockfish/pull/2628 No functional change
This commit is contained in:
@@ -269,7 +269,7 @@ inline bool Position::can_castle(CastlingRights cr) const {
|
||||
}
|
||||
|
||||
inline int Position::castling_rights(Color c) const {
|
||||
return st->castlingRights & (c == WHITE ? WHITE_CASTLING : BLACK_CASTLING);
|
||||
return c & CastlingRights(st->castlingRights);
|
||||
}
|
||||
|
||||
inline bool Position::castling_impeded(CastlingRights cr) const {
|
||||
|
||||
Reference in New Issue
Block a user