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:
Marco Costalba
2014-03-09 11:03:02 +01:00
parent 1d1b7df7c6
commit 5cf9e0b254
2 changed files with 34 additions and 19 deletions

View File

@@ -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];
}