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:
Marco Costalba
2012-02-26 17:34:24 +01:00
parent 8751b18cf0
commit 96eefc4af6
4 changed files with 39 additions and 64 deletions

View File

@@ -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];
}