rename shift variables.

Where variable names are explicitly incorrect, I feel morally obligated to at least
suggest an alternative. There are many, but these two are especially egregious.

No functional change.
This commit is contained in:
Mike Whiteley
2018-02-21 21:46:25 +01:00
committed by Stéphane Nicolet
parent 6c898a10be
commit 820c5c25b6
4 changed files with 22 additions and 19 deletions

View File

@@ -115,6 +115,7 @@ public:
Bitboard attacks_from(PieceType pt, Square s) const;
template<PieceType> Bitboard attacks_from(Square s) const;
template<PieceType> Bitboard attacks_from(Square s, Color c) const;
template<Color> Bitboard pawn_attacks(Bitboard b) const;
Bitboard slider_blockers(Bitboard sliders, Square s, Bitboard& pinners) const;
// Properties of moves
@@ -288,6 +289,12 @@ inline Bitboard Position::attacks_from(PieceType pt, Square s) const {
return attacks_bb(pt, s, byTypeBB[ALL_PIECES]);
}
template<Color c>
inline Bitboard Position::pawn_attacks(Bitboard b) const {
return c == WHITE ? shift<NORTH_WEST>(b) | shift<NORTH_EAST>(b)
: shift<SOUTH_WEST>(b) | shift<SOUTH_EAST>(b);
}
inline Bitboard Position::attackers_to(Square s) const {
return attackers_to(s, byTypeBB[ALL_PIECES]);
}