mirror of
https://github.com/opelly27/Stockfish.git
synced 2026-05-20 16:47:37 +00:00
Retire attackers_to(Square s, Color c)
Use the definition in the few places where is needed. As a nice side effect there is also an optimization in generate_evasions() where the bitboard of enemy pieces is computed only once and out of a tight loop. No functional change. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
@@ -197,7 +197,6 @@ public:
|
||||
|
||||
// Information about attacks to or from a given square
|
||||
Bitboard attackers_to(Square s) const;
|
||||
Bitboard attackers_to(Square s, Color c) const;
|
||||
Bitboard piece_attacks_from(Piece p, Square s) const;
|
||||
Bitboard pawn_attacks_from(Square s, Color c) const;
|
||||
template<PieceType> Bitboard piece_attacks_from(Square s) const;
|
||||
@@ -470,11 +469,6 @@ inline bool Position::is_check() const {
|
||||
return st->checkersBB != EmptyBoardBB;
|
||||
}
|
||||
|
||||
inline Bitboard Position::attackers_to(Square s, Color c) const {
|
||||
|
||||
return attackers_to(s) & pieces_of_color(c);
|
||||
}
|
||||
|
||||
inline bool Position::pawn_is_passed(Color c, Square s) const {
|
||||
return !(pieces(PAWN, opposite_color(c)) & passed_pawn_mask(c, s));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user