mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-24 02:57:11 +08:00
Retire SERIALIZE macros
Explicitly write the 'while' loops. This adds some code but makes clear what's the code behind the macro. No functional change.
This commit is contained in:
@@ -292,7 +292,7 @@ inline Square Position::castling_rook_square(CastlingRight cr) const {
|
||||
template<PieceType Pt>
|
||||
inline Bitboard Position::attacks_from(Square s) const {
|
||||
|
||||
return Pt == BISHOP || Pt == ROOK ? attacks_bb<Pt>(s, pieces())
|
||||
return Pt == BISHOP || Pt == ROOK ? attacks_bb<Pt>(s, byTypeBB[ALL_PIECES])
|
||||
: Pt == QUEEN ? attacks_from<ROOK>(s) | attacks_from<BISHOP>(s)
|
||||
: StepAttacksBB[Pt][s];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user