mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-24 02:57:11 +08:00
Add lsb() overload
Helper to find least significant bit relative to the given color. No functional change. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
committed by
Marco Costalba
parent
e6482b7d97
commit
aecdbfc4a0
@@ -319,4 +319,9 @@ extern Square pop_lsb(Bitboard* b);
|
||||
|
||||
#endif
|
||||
|
||||
/// lsb() overload finds least significant bit relative to the given color
|
||||
inline Square lsb(Color c, Bitboard b) {
|
||||
return c == WHITE ? lsb(b) : msb(b);
|
||||
}
|
||||
|
||||
#endif // #ifndef BITBOARD_H_INCLUDED
|
||||
|
||||
Reference in New Issue
Block a user