Rewrite some bitboard init code

And move the static function Position::attacks_from() to
bitboard code renaming it attacks_bb()

No functional change.
This commit is contained in:
Marco Costalba
2013-11-30 10:27:23 +01:00
parent 6ea5dc294c
commit 034a2b04f2
5 changed files with 27 additions and 36 deletions
+1 -2
View File
@@ -114,7 +114,6 @@ public:
Bitboard attackers_to(Square s) const;
Bitboard attackers_to(Square s, Bitboard occ) const;
Bitboard attacks_from(Piece p, Square s) const;
static Bitboard attacks_from(Piece p, Square s, Bitboard occ);
template<PieceType> Bitboard attacks_from(Square s) const;
template<PieceType> Bitboard attacks_from(Square s, Color c) const;
@@ -304,7 +303,7 @@ inline Bitboard Position::attacks_from<PAWN>(Square s, Color c) const {
}
inline Bitboard Position::attacks_from(Piece p, Square s) const {
return attacks_from(p, s, byTypeBB[ALL_PIECES]);
return attacks_bb(p, s, byTypeBB[ALL_PIECES]);
}
inline Bitboard Position::attackers_to(Square s) const {