Change pawn_attacks() API

Instead of pawn_attacks(Color c, Square s) define as
pawn_attacks(Square s, Color c) to be more aligned to
the others attack info functions.

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
Marco Costalba
2009-09-20 08:59:18 +01:00
parent 62a8f393f1
commit 049139d025
6 changed files with 29 additions and 32 deletions

View File

@@ -437,7 +437,7 @@ ScaleFactor ScalingFunction<KQKRPs>::apply(const Position& pos) {
&& (pos.piece_attacks<KING>(kingSq) & pos.pieces(PAWN, weakerSide)))
{
Square rsq = pos.piece_list(weakerSide, ROOK, 0);
if (pos.pawn_attacks(strongerSide, rsq) & pos.pieces(PAWN, weakerSide))
if (pos.pawn_attacks(rsq, strongerSide) & pos.pieces(PAWN, weakerSide))
return ScaleFactor(0);
}
return SCALE_FACTOR_NONE;