mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-23 02:27:00 +08:00
Introduce another two (bitboard,square) operators
And simplify the code. No functional change. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
@@ -57,11 +57,19 @@ inline Bitboard operator&(Bitboard b, Square s) {
|
||||
}
|
||||
|
||||
inline Bitboard& operator|=(Bitboard& b, Square s) {
|
||||
return b |= SquareBB[s], b;
|
||||
return b |= SquareBB[s];
|
||||
}
|
||||
|
||||
inline Bitboard& operator^=(Bitboard& b, Square s) {
|
||||
return b ^= SquareBB[s], b;
|
||||
return b ^= SquareBB[s];
|
||||
}
|
||||
|
||||
inline Bitboard operator|(Bitboard b, Square s) {
|
||||
return b | SquareBB[s];
|
||||
}
|
||||
|
||||
inline Bitboard operator^(Bitboard b, Square s) {
|
||||
return b ^ SquareBB[s];
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user