X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fbitboard.h;h=241970f834c398b765069d89f261185e700db6d4;hp=7a39a5009c5571ccf0ef68b5d90792acc353de9b;hb=96eefc4af65204cd2ddad64ac53b8d449f49efa5;hpb=8751b18cf0b5ddb9d7549a465444d5ace215a097 diff --git a/src/bitboard.h b/src/bitboard.h index 7a39a500..241970f8 100644 --- a/src/bitboard.h +++ b/src/bitboard.h @@ -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]; }