mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-20 00:56:39 +08:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user