mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-20 09:06:45 +08:00
Small cleanups
closes https://github.com/official-stockfish/Stockfish/pull/2756 No functional change
This commit is contained in:
@@ -349,16 +349,16 @@ constexpr Color operator~(Color c) {
|
||||
return Color(c ^ BLACK); // Toggle color
|
||||
}
|
||||
|
||||
constexpr Square flip_rank(Square s) {
|
||||
constexpr Square flip_rank(Square s) { // Swap A1 <-> A8
|
||||
return Square(s ^ SQ_A8);
|
||||
}
|
||||
|
||||
constexpr Square flip_file(Square s) {
|
||||
constexpr Square flip_file(Square s) { // Swap A1 <-> H1
|
||||
return Square(s ^ SQ_H1);
|
||||
}
|
||||
|
||||
constexpr Piece operator~(Piece pc) {
|
||||
return Piece(pc ^ 8); // Swap color of piece B_KNIGHT -> W_KNIGHT
|
||||
return Piece(pc ^ 8); // Swap color of piece B_KNIGHT <-> W_KNIGHT
|
||||
}
|
||||
|
||||
constexpr CastlingRights operator&(Color c, CastlingRights cr) {
|
||||
|
||||
Reference in New Issue
Block a user