]> git.sesse.net Git - stockfish/blobdiff - src/bitboard.h
Introduce another two (bitboard,square) operators
[stockfish] / src / bitboard.h
index 7a39a5009c5571ccf0ef68b5d90792acc353de9b..241970f834c398b765069d89f261185e700db6d4 100644 (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];
 }