Skip to content

Commit

Permalink
search(): Move nullValue variable into local scope
Browse files Browse the repository at this point in the history
No functional change

Closes #1003
  • Loading branch information
VoyagerOne authored and zamar committed Feb 15, 2017
1 parent 1e814e0 commit 83fb454
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/search.cpp
Expand Up @@ -564,7 +564,7 @@ namespace {
Key posKey;
Move ttMove, move, excludedMove, bestMove;
Depth extension, newDepth;
Value bestValue, value, ttValue, eval, nullValue;
Value bestValue, value, ttValue, eval;
bool ttHit, inCheck, givesCheck, singularExtensionNode, improving;
bool captureOrPromotion, doFullDepthSearch, moveCountPruning;
Piece moved_piece;
Expand Down Expand Up @@ -768,8 +768,8 @@ namespace {
Depth R = ((823 + 67 * depth / ONE_PLY) / 256 + std::min((eval - beta) / PawnValueMg, 3)) * ONE_PLY;

pos.do_null_move(st);
nullValue = depth-R < ONE_PLY ? -qsearch<NonPV, false>(pos, ss+1, -beta, -beta+1)
: - search<NonPV>(pos, ss+1, -beta, -beta+1, depth-R, !cutNode, true);
Value nullValue = depth-R < ONE_PLY ? -qsearch<NonPV, false>(pos, ss+1, -beta, -beta+1)
: - search<NonPV>(pos, ss+1, -beta, -beta+1, depth-R, !cutNode, true);
pos.undo_null_move();

if (nullValue >= beta)
Expand Down

0 comments on commit 83fb454

Please sign in to comment.