mirror of
https://github.com/sockspls/badfish
synced 2025-05-02 01:29:36 +00:00
Fix compile on 64 bits
Reported by Quocvuong82. No functional change.
This commit is contained in:
parent
e4a0482e43
commit
09acdac56b
1 changed files with 10 additions and 10 deletions
|
@ -72,12 +72,6 @@ namespace {
|
||||||
|
|
||||||
void init_magics(Bitboard table[], Bitboard* attacks[], Bitboard magics[],
|
void init_magics(Bitboard table[], Bitboard* attacks[], Bitboard magics[],
|
||||||
Bitboard masks[], unsigned shifts[], Square deltas[], Fn index);
|
Bitboard masks[], unsigned shifts[], Square deltas[], Fn index);
|
||||||
}
|
|
||||||
|
|
||||||
/// lsb()/msb() finds the least/most significant bit in a nonzero bitboard.
|
|
||||||
/// pop_lsb() finds and clears the least significant bit in a nonzero bitboard.
|
|
||||||
|
|
||||||
#if !defined(USE_BSFQ)
|
|
||||||
|
|
||||||
FORCE_INLINE unsigned bsf_index(Bitboard b) {
|
FORCE_INLINE unsigned bsf_index(Bitboard b) {
|
||||||
|
|
||||||
|
@ -88,6 +82,12 @@ FORCE_INLINE unsigned bsf_index(Bitboard b) {
|
||||||
b ^= (b - 1);
|
b ^= (b - 1);
|
||||||
return ((unsigned(b) ^ unsigned(b >> 32)) * DeBruijn_32) >> 26;
|
return ((unsigned(b) ^ unsigned(b >> 32)) * DeBruijn_32) >> 26;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// lsb()/msb() finds the least/most significant bit in a nonzero bitboard.
|
||||||
|
/// pop_lsb() finds and clears the least significant bit in a nonzero bitboard.
|
||||||
|
|
||||||
|
#if !defined(USE_BSFQ)
|
||||||
|
|
||||||
Square lsb(Bitboard b) { return BSFTable[bsf_index(b)]; }
|
Square lsb(Bitboard b) { return BSFTable[bsf_index(b)]; }
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue