Fix semantic of piece_attacks<PAWN>

Return the bitboard with the pawn attacks for both colors
so to be aligned to the meaning of the others piece_attacks<Piece>
templates.

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
Marco Costalba
2009-09-13 16:13:49 +01:00
parent 3863cd191c
commit 6709b01903
2 changed files with 2 additions and 2 deletions

View File

@@ -667,7 +667,7 @@ inline void Position::update_checkers(Bitboard* pCheckersBB, Square ksq, Square
else if ( Piece != KING
&& !Slider
&& bit_is_set(piece_attacks<Piece>(ksq), to))
&& bit_is_set(Piece == PAWN ? pawn_attacks(opposite_color(sideToMove), ksq) : piece_attacks<Piece>(ksq), to))
set_bit(pCheckersBB, to);
// Discovery checks