X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fbitboard.h;h=6dd07d5407f85bc431328915c8c459e3a043d7f7;hp=2b9161250f5fb8277ba4f2deac1e012646cec331;hb=10e64e05094e75d89baa4495fa867a8a64195bb7;hpb=374c9e6b63d0e233371ae38cc054d885f2117884 diff --git a/src/bitboard.h b/src/bitboard.h index 2b916125..6dd07d54 100644 --- a/src/bitboard.h +++ b/src/bitboard.h @@ -214,6 +214,7 @@ inline bool single_bit(Bitboard b) { return !(b & (b - 1)); } + /// first_1() finds the least significant nonzero bit in a nonzero bitboard. /// pop_1st_bit() finds and clears the least significant nonzero bit in a /// nonzero bitboard. @@ -262,16 +263,6 @@ extern Square pop_1st_bit(Bitboard* b); #endif -// relative_rank() returns the relative rank of the closest bit set on the Bitboard. -// Only to be used with bitboards that contain a single file. - -template -inline Rank relative_rank(Bitboard b) { - Square s = Us == WHITE ? first_1(b) - : ~last_1(b); - return rank_of(s); -} - extern void print_bitboard(Bitboard b); extern void bitboards_init();