mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-22 01:56:58 +08:00
Assorted trivial cleanups 4/2019
No functional change.
This commit is contained in:
@@ -95,7 +95,7 @@ public:
|
||||
template<PieceType Pt> int count() const;
|
||||
template<PieceType Pt> const Square* squares(Color c) const;
|
||||
template<PieceType Pt> Square square(Color c) const;
|
||||
int semiopen_file(Color c, File f) const;
|
||||
bool is_semiopen_file(Color c, File f) const;
|
||||
|
||||
// Castling
|
||||
int castling_rights(Color c) const;
|
||||
@@ -262,7 +262,7 @@ inline Square Position::ep_square() const {
|
||||
return st->epSquare;
|
||||
}
|
||||
|
||||
inline int Position::semiopen_file(Color c, File f) const {
|
||||
inline bool Position::is_semiopen_file(Color c, File f) const {
|
||||
return !(pieces(c, PAWN) & file_bb(f));
|
||||
}
|
||||
|
||||
@@ -321,7 +321,7 @@ inline bool Position::pawn_passed(Color c, Square s) const {
|
||||
|
||||
inline bool Position::advanced_pawn_push(Move m) const {
|
||||
return type_of(moved_piece(m)) == PAWN
|
||||
&& relative_rank(sideToMove, from_sq(m)) > RANK_4;
|
||||
&& relative_rank(sideToMove, to_sq(m)) > RANK_5;
|
||||
}
|
||||
|
||||
inline int Position::pawns_on_same_color_squares(Color c, Square s) const {
|
||||
|
||||
Reference in New Issue
Block a user