mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-22 10:06:26 +08:00
Simplify attacks_bb()
And some formatting while there. No functional change. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
@@ -216,8 +216,7 @@ FORCE_INLINE unsigned magic_index(Square s, Bitboard occ) {
|
||||
|
||||
template<PieceType Pt>
|
||||
inline Bitboard attacks_bb(Square s, Bitboard occ) {
|
||||
Bitboard** const Attacks = Pt == ROOK ? RAttacks : BAttacks;
|
||||
return Attacks[s][magic_index<Pt>(s, occ)];
|
||||
return (Pt == ROOK ? RAttacks : BAttacks)[s][magic_index<Pt>(s, occ)];
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user