X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fbitboard.h;h=b29f3e24fa1d5d29e230cde88c0105b0d8e6365f;hp=70835e8eeff144ef08c7b19753933ea18ca7798e;hb=0e89d6e7546d26a19a108d047b489d9ba6f7970c;hpb=50890616591443ab06faa0927747bf14c8d450e3 diff --git a/src/bitboard.h b/src/bitboard.h index 70835e8e..b29f3e24 100644 --- a/src/bitboard.h +++ b/src/bitboard.h @@ -212,6 +212,7 @@ constexpr Bitboard adjacent_files_bb(Square s) { inline Bitboard line_bb(Square s1, Square s2) { assert(is_ok(s1) && is_ok(s2)); + return LineBB[s1][s2]; } @@ -225,7 +226,9 @@ inline Bitboard line_bb(Square s1, Square s2) { /// interpose itself to cover the check or capture the checking piece. inline Bitboard between_bb(Square s1, Square s2) { + assert(is_ok(s1) && is_ok(s2)); + return BetweenBB[s1][s2]; } @@ -428,10 +431,10 @@ inline Bitboard least_significant_square_bb(Bitboard b) { /// pop_lsb() finds and clears the least significant bit in a non-zero bitboard -inline Square pop_lsb(Bitboard* b) { - assert(*b); - const Square s = lsb(*b); - *b &= *b - 1; +inline Square pop_lsb(Bitboard& b) { + assert(b); + const Square s = lsb(b); + b &= b - 1; return s; }