mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-20 00:56:39 +08:00
Cleanup work in misc.cpp
Also some code style tidy up of latest patches. Also renamed checkSq -> checkSquares because it is a bitboard and not a square. No functional change.
This commit is contained in:
@@ -181,15 +181,15 @@ void Search::init() {
|
||||
}
|
||||
|
||||
|
||||
/// Search::reset() clears all search memory, to restore a deterministic state
|
||||
/// Search::reset() clears all search memory, to obtain reproducible search results
|
||||
|
||||
void Search::reset () {
|
||||
|
||||
TT.clear();
|
||||
History.clear();
|
||||
CounterMovesHistory.clear();
|
||||
Gains.clear();
|
||||
Countermoves.clear();
|
||||
TT.clear();
|
||||
History.clear();
|
||||
CounterMovesHistory.clear();
|
||||
Gains.clear();
|
||||
Countermoves.clear();
|
||||
}
|
||||
|
||||
|
||||
@@ -858,7 +858,7 @@ moves_loop: // When in check and at SpNode search starts from here
|
||||
captureOrPromotion = pos.capture_or_promotion(move);
|
||||
|
||||
givesCheck = type_of(move) == NORMAL && !ci.dcCandidates
|
||||
? ci.checkSq[type_of(pos.piece_on(from_sq(move)))] & to_sq(move)
|
||||
? ci.checkSquares[type_of(pos.piece_on(from_sq(move)))] & to_sq(move)
|
||||
: pos.gives_check(move, ci);
|
||||
|
||||
dangerous = givesCheck
|
||||
@@ -1281,7 +1281,7 @@ moves_loop: // When in check and at SpNode search starts from here
|
||||
assert(is_ok(move));
|
||||
|
||||
givesCheck = type_of(move) == NORMAL && !ci.dcCandidates
|
||||
? ci.checkSq[type_of(pos.piece_on(from_sq(move)))] & to_sq(move)
|
||||
? ci.checkSquares[type_of(pos.piece_on(from_sq(move)))] & to_sq(move)
|
||||
: pos.gives_check(move, ci);
|
||||
|
||||
// Futility pruning
|
||||
|
||||
Reference in New Issue
Block a user