X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fposition.cpp;h=573b5df59a7885071a73855d9a0ff49739f0227b;hb=cc54a91ca508e68bf84715a50f84c79f66b8f109;hp=9db41b784918388f31b9f4d5a3385c043d2ae4f8;hpb=8d16111ffde1689d48d47ec379ba91613213183c;p=stockfish diff --git a/src/position.cpp b/src/position.cpp index 9db41b78..573b5df5 100644 --- a/src/position.cpp +++ b/src/position.cpp @@ -58,7 +58,7 @@ Score psq[COLOR_NB][PIECE_TYPE_NB][SQUARE_NB]; // valuable attacker for the side to move, remove the attacker we just found // from the bitboards and scan for new X-ray attacks behind it. -template FORCE_INLINE +template PieceType min_attacker(const Bitboard* bb, const Square& to, const Bitboard& stmAttackers, Bitboard& occupied, Bitboard& attackers) { @@ -78,7 +78,7 @@ PieceType min_attacker(const Bitboard* bb, const Square& to, const Bitboard& stm return (PieceType)Pt; } -template<> FORCE_INLINE +template<> PieceType min_attacker(const Bitboard*, const Square&, const Bitboard&, Bitboard&, Bitboard&) { return KING; // No need to update bitboards: it is the last cycle } @@ -149,6 +149,7 @@ void Position::init() { for (int cr = NO_CASTLING; cr <= ANY_CASTLING; ++cr) { + Zobrist::castling[cr] = 0; Bitboard b = cr; while (b) { @@ -1078,8 +1079,8 @@ Value Position::see(Move m) const { } -/// Position::is_draw() tests whether the position is drawn by material, 50 moves -/// rule or repetition. It does not detect stalemates. +/// Position::is_draw() tests whether the position is drawn by 50-move rule +/// or by repetition. It does not detect stalemates. bool Position::is_draw() const {