Rename piece_attacks_from() in attacks_from()

It is in line with attackers_to() and is shorter and
piece is already redundant because is passed as template
parameter anyway.

Integrate also pawn_attacks_from() in the attacks_from()
family so to have an uniform attack info API.

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
Marco Costalba
2009-09-20 14:23:46 +01:00
parent dd80b9abaf
commit e4277c06bf
7 changed files with 82 additions and 86 deletions

View File

@@ -2182,7 +2182,7 @@ namespace {
// Case 4: The destination square for m2 is attacked by the moving piece in m1
p = pos.piece_on(t1);
if (bit_is_set(pos.piece_attacks_from(p, t1), t2))
if (bit_is_set(pos.attacks_from(p, t1), t2))
return true;
// Case 5: Discovered check, checking piece is the piece moved in m1