Assorted trivial cleanups January 2020

Assorted trivial cleanups.

No functional change
This commit is contained in:
Stéphane Nicolet
2020-01-09 20:49:13 +01:00
parent bae019b53e
commit 384bff4264
5 changed files with 38 additions and 35 deletions

View File

@@ -46,7 +46,6 @@ struct StateInfo {
Square epSquare;
// Not copied when making a move (will be recomputed anyhow)
int repetition;
Key key;
Bitboard checkersBB;
Piece capturedPiece;
@@ -54,6 +53,7 @@ struct StateInfo {
Bitboard blockersForKing[COLOR_NB];
Bitboard pinners[COLOR_NB];
Bitboard checkSquares[PIECE_TYPE_NB];
int repetition;
};
/// A list to keep track of the position states along the setup moves (from the
@@ -277,10 +277,14 @@ inline int Position::castling_rights(Color c) const {
}
inline bool Position::castling_impeded(CastlingRights cr) const {
assert(cr == WHITE_OO || cr == WHITE_OOO || cr == BLACK_OO || cr == BLACK_OOO);
return byTypeBB[ALL_PIECES] & castlingPath[cr];
}
inline Square Position::castling_rook_square(CastlingRights cr) const {
assert(cr == WHITE_OO || cr == WHITE_OOO || cr == BLACK_OO || cr == BLACK_OOO);
return castlingRookSquare[cr];
}