small cleanups

closes https://github.com/official-stockfish/Stockfish/pull/2653

No functional change
This commit is contained in:
Joost VandeVondele
2020-05-23 13:26:13 +02:00
parent d940e59dad
commit 383b12e1a5
14 changed files with 64 additions and 50 deletions

View File

@@ -98,7 +98,7 @@ public:
bool is_on_semiopen_file(Color c, Square s) const;
// Castling
int castling_rights(Color c) const;
CastlingRights castling_rights(Color c) const;
bool can_castle(CastlingRights cr) const;
bool castling_impeded(CastlingRights cr) const;
Square castling_rook_square(CastlingRights cr) const;
@@ -268,7 +268,7 @@ inline bool Position::can_castle(CastlingRights cr) const {
return st->castlingRights & cr;
}
inline int Position::castling_rights(Color c) const {
inline CastlingRights Position::castling_rights(Color c) const {
return c & CastlingRights(st->castlingRights);
}
@@ -399,8 +399,7 @@ inline Thread* Position::this_thread() const {
inline void Position::put_piece(Piece pc, Square s) {
board[s] = pc;
byTypeBB[ALL_PIECES] |= s;
byTypeBB[type_of(pc)] |= s;
byTypeBB[ALL_PIECES] |= byTypeBB[type_of(pc)] |= s;
byColorBB[color_of(pc)] |= s;
index[s] = pieceCount[pc]++;
pieceList[pc][index[s]] = s;