-inline Bitboard& operator|=(Bitboard& b, Square s) {
- assert(s >= SQ_A1 && s <= SQ_H8);
- return b |= SquareBB[s];
-}
-
-inline Bitboard& operator^=(Bitboard& b, Square s) {
- assert(s >= SQ_A1 && s <= SQ_H8);
- return b ^= SquareBB[s];
-}
+inline Bitboard operator&( Bitboard b, Square s) { return b & square_bb(s); }
+inline Bitboard operator|( Bitboard b, Square s) { return b | square_bb(s); }
+inline Bitboard operator^( Bitboard b, Square s) { return b ^ square_bb(s); }
+inline Bitboard& operator|=(Bitboard& b, Square s) { return b |= square_bb(s); }
+inline Bitboard& operator^=(Bitboard& b, Square s) { return b ^= square_bb(s); }