]> git.sesse.net Git - stockfish/commitdiff
Remove useless assignments to currentMove
authorajithcj <achajo@yahoo.co.in>
Sat, 15 Oct 2016 07:29:24 +0000 (07:29 +0000)
committerMarco Costalba <mcostalba@gmail.com>
Tue, 18 Oct 2016 07:00:52 +0000 (09:00 +0200)
We reference (ss-1)->currentMove, i.e. we peek
current move of the parent node, so currentMove
should be valid in the main move loop, when we
search() the subtree, but outside of main loop
it is useless.

No functional change.

src/search.cpp

index 81b3f29f335119e4aa7945f689fb68205dca7279..3d559a0d30613cd807e79daae4075b763eabdc84 100644 (file)
@@ -636,8 +636,6 @@ namespace {
         && (ttValue >= beta ? (tte->bound() & BOUND_LOWER)
                             : (tte->bound() & BOUND_UPPER)))
     {
-        ss->currentMove = ttMove; // Can be MOVE_NONE
-
         // If ttMove is quiet, update killers, history, counter move on TT hit
         if (ttValue >= beta && ttMove)
         {
@@ -1228,10 +1226,7 @@ moves_loop: // When in check search starts from here
         && ttValue != VALUE_NONE // Only in case of TT access race
         && (ttValue >= beta ? (tte->bound() &  BOUND_LOWER)
                             : (tte->bound() &  BOUND_UPPER)))
-    {
-        ss->currentMove = ttMove; // Can be MOVE_NONE
         return ttValue;
-    }
 
     // Evaluate the position statically
     if (InCheck)