mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-23 02:27:00 +08:00
Small cleanup in init_sliding_attacks()
No functional change both in 32 and 64 bits. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
@@ -190,17 +190,13 @@ inline Bitboard bishop_attacks_bb(Square s, Bitboard blockers) {
|
||||
inline Bitboard rook_attacks_bb(Square s, Bitboard blockers) {
|
||||
Bitboard b = blockers & RMask[s];
|
||||
return RAttacks[RAttackIndex[s] +
|
||||
(unsigned(int(b) * int(RMult[s]) ^
|
||||
int(b >> 32) * int(RMult[s] >> 32))
|
||||
>> RShift[s])];
|
||||
(unsigned(int(b) * int(RMult[s]) ^ int(b >> 32) * int(RMult[s] >> 32)) >> RShift[s])];
|
||||
}
|
||||
|
||||
inline Bitboard bishop_attacks_bb(Square s, Bitboard blockers) {
|
||||
Bitboard b = blockers & BMask[s];
|
||||
return BAttacks[BAttackIndex[s] +
|
||||
(unsigned(int(b) * int(BMult[s]) ^
|
||||
int(b >> 32) * int(BMult[s] >> 32))
|
||||
>> BShift[s])];
|
||||
(unsigned(int(b) * int(BMult[s]) ^ int(b >> 32) * int(BMult[s] >> 32)) >> BShift[s])];
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user