From 99f3ad6858889bbc40c016c96c9f7e53a773e49e Mon Sep 17 00:00:00 2001 From: ajithcj Date: Sat, 15 Oct 2016 07:29:24 +0000 Subject: [PATCH 1/1] Remove useless assignments to currentMove 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 | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/search.cpp b/src/search.cpp index 81b3f29f..3d559a0d 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -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) -- 2.39.2