]> git.sesse.net Git - stockfish/blobdiff - src/search.cpp
Introduce another two (bitboard,square) operators
[stockfish] / src / search.cpp
index a322a01df4cec0fe93f517f5fc2c6c6049641718..40f14a509d2e0bc940023354897f15a9a0f14530 100644 (file)
@@ -1410,13 +1410,11 @@ split_point_start: // At split points actual search starts from here
 
     // Case 5: Discovered check, checking piece is the piece moved in m1
     ksq = pos.king_square(pos.side_to_move());
-    if (piece_is_slider(p1) && (squares_between(t1, ksq) & f2))
-    {
-        Bitboard occ = pos.occupied_squares();
-        occ ^= f2;
-        if (pos.attacks_from(p1, t1, occ) & ksq)
-            return true;
-    }
+    if (    piece_is_slider(p1)
+        && (squares_between(t1, ksq) & f2)
+        && (pos.attacks_from(p1, t1, pos.occupied_squares() ^ f2) & ksq))
+        return true;
+
     return false;
   }