]> git.sesse.net Git - stockfish/commitdiff
Small code cleanup in LMR
authorVizvezdenec <Vizvezdenec@gmail.com>
Sun, 10 Jan 2021 17:24:37 +0000 (20:24 +0300)
committerJoost VandeVondele <Joost.VandeVondele@gmail.com>
Mon, 11 Jan 2021 18:17:03 +0000 (19:17 +0100)
In a recent patch we added comparing capture history to a number for LMR of captures.
Calling it via thisThread-> is not needed since capture history was already declared by this time -
so removing makes code slightly shorter and easier to follow.

closes https://github.com/official-stockfish/Stockfish/pull/3297

No functional change.

src/search.cpp

index d2a641768fe906c76d73442157598f7841656918..e405a3732d768ea015b11061001d1cd58a102bd4 100644 (file)
@@ -1159,7 +1159,7 @@ moves_loop: // When in check, search starts from here
               || moveCountPruning
               || ss->staticEval + PieceValue[EG][pos.captured_piece()] <= alpha
               || cutNode
-              || (!PvNode && !formerPv && thisThread->captureHistory[movedPiece][to_sq(move)][type_of(pos.captured_piece())] < 4506)
+              || (!PvNode && !formerPv && captureHistory[movedPiece][to_sq(move)][type_of(pos.captured_piece())] < 4506)
               || thisThread->ttHitAverage < 432 * TtHitAverageResolution * TtHitAverageWindow / 1024))
       {
           Depth r = reduction(improving, depth, moveCount);