Remove redundant legality check
authorFabian Fichter <ianfab@users.noreply.github.com>
Mon, 8 Feb 2021 21:50:15 +0000 (22:50 +0100)
committerFabian Fichter <ianfab@users.noreply.github.com>
Mon, 8 Feb 2021 21:50:15 +0000 (22:50 +0100)
No functional change.

src/search.cpp

index 7eb4252..c03a835 100644 (file)
@@ -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);