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:
Marco Costalba
2015-05-09 11:09:06 +02:00
parent eaeb63f1d0
commit ee0371f86e
8 changed files with 52 additions and 69 deletions

View File

@@ -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