From d6bdcec52c33a67970721c4443136b42265a6148 Mon Sep 17 00:00:00 2001 From: gab8192 Date: Wed, 3 Apr 2024 23:41:24 +0200 Subject: [PATCH] Remove an useless assignment The assignment (ss + 1)->excludedMove = Move::none() can be simplified away because when that line is reached, (ss + 1)->excludedMove is always already none. The only moment stack[x]->excludedMove is modified, is during singular search, but it is reset to none right after the singular search is finished. closes https://github.com/official-stockfish/Stockfish/pull/5153 No functional change --- src/search.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/search.cpp b/src/search.cpp index a131c958..3d84eb36 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -585,7 +585,7 @@ Value Search::Worker::search( assert(0 <= ss->ply && ss->ply < MAX_PLY); - (ss + 1)->excludedMove = bestMove = Move::none(); + bestMove = Move::none(); (ss + 2)->killers[0] = (ss + 2)->killers[1] = Move::none(); (ss + 2)->cutoffCnt = 0; ss->multipleExtensions = (ss - 1)->multipleExtensions;