From 29a3127a2db8a4c1f8b3676a9384cce110140aa3 Mon Sep 17 00:00:00 2001 From: Fabian Fichter Date: Mon, 8 Feb 2021 22:50:15 +0100 Subject: [PATCH] Remove redundant legality check No functional change. --- src/search.cpp | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/search.cpp b/src/search.cpp index 7eb4252..c03a835 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -1115,7 +1115,7 @@ moves_loop: // When in check, search starts from here { // Skip quiet moves if movecount exceeds our FutilityMoveCount threshold moveCountPruning = moveCount >= futility_move_count(improving, depth) - || (pos.must_capture() && (moveCountPruning || (pos.capture(move) && pos.legal(move)))); + || (pos.must_capture() && (moveCountPruning || pos.capture(move))); // Reduced depth of the next LMR search int lmrDepth = std::max(newDepth - reduction(improving, depth, moveCount), 0); -- 1.7.0.4