mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-21 09:37:16 +08:00
Move halfOpenFiles[] calculation out of a loop
And put it in an already existing one so to optimze a bit. Also additional cleanups and code shuffles all around the place. No functional change. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
@@ -248,10 +248,6 @@ public:
|
||||
static bool pawn_is_isolated(Bitboard ourPawns, Square s);
|
||||
static bool pawn_is_doubled(Bitboard ourPawns, Color c, Square s);
|
||||
|
||||
// Open and half-open files
|
||||
static bool file_is_open(Bitboard pawns, File f);
|
||||
static bool file_is_half_open(Bitboard pawns, File f);
|
||||
|
||||
// Weak squares
|
||||
bool square_is_weak(Square s, Color c) const;
|
||||
|
||||
@@ -605,14 +601,6 @@ inline bool Position::pawn_is_doubled(Bitboard ourPawns, Color c, Square s) {
|
||||
return ourPawns & squares_behind(c, s);
|
||||
}
|
||||
|
||||
inline bool Position::file_is_open(Bitboard pawns, File f) {
|
||||
return !(pawns & file_bb(f));
|
||||
}
|
||||
|
||||
inline bool Position::file_is_half_open(Bitboard pawns, File f) {
|
||||
return !(pawns & file_bb(f));
|
||||
}
|
||||
|
||||
inline bool Position::square_is_weak(Square s, Color c) const {
|
||||
return !(pawns(c) & outpost_mask(opposite_color(c), s));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user