]> git.sesse.net Git - stockfish/blobdiff - src/search.cpp
Remove unnecessay legality check
[stockfish] / src / search.cpp
index 4a9bd7de047cea9911d9b55a4702fab07145a95b..e5d18f776f176b04d476852904ca774c401185ce 100644 (file)
@@ -1079,8 +1079,7 @@ moves_loop: // When in check, search starts from here
        /* &&  ttValue != VALUE_NONE Already implicit in the next condition */
           &&  abs(ttValue) < VALUE_KNOWN_WIN
           && (tte->bound() & BOUND_LOWER)
-          &&  tte->depth() >= depth - 3
-          &&  pos.legal(move))
+          &&  tte->depth() >= depth - 3)
       {
           Value singularBeta = ttValue - ((formerPv + 4) * depth) / 2;
           Depth singularDepth = (depth - 1 + 3 * formerPv) / 2;
@@ -1134,7 +1133,7 @@ moves_loop: // When in check, search starts from here
       // Castling extension
       if (type_of(move) == CASTLING)
           extension = 1;
-         
+
       // Late irreversible move extension
       if (   move == ttMove
           && pos.rule50_count() > 80