X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fbitboard.h;h=8d748eeed8615628ddd4b044df9c34aef4fcaeff;hp=477b1655d5d5c2ece4317c97531716caddae20ba;hb=3ef0c3c34a00e6b13d6c96d8c2f0d8d7a6cc25a6;hpb=7efc39d6833a0d999a7bf2f9b5629ceb246accd2 diff --git a/src/bitboard.h b/src/bitboard.h index 477b1655..8d748eee 100644 --- a/src/bitboard.h +++ b/src/bitboard.h @@ -119,6 +119,12 @@ 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&(Square s, Bitboard b) { return b & s; } +inline Bitboard operator|(Square s, Bitboard b) { return b | s; } +inline Bitboard operator^(Square s, Bitboard b) { return b ^ s; } + +inline Bitboard operator|(Square s, Square s2) { return square_bb(s) | square_bb(s2); } + constexpr bool more_than_one(Bitboard b) { return b & (b - 1); }