]> git.sesse.net Git - stockfish/blobdiff - src/search.cpp
Introduce single_bit() helper
[stockfish] / src / search.cpp
index f71b54bc7d0fa6e22dc539b3b25f48d53c2ac666..03df6d7802547e76f171a85b1369449493311217 100644 (file)
@@ -1351,7 +1351,7 @@ split_point_start: // At split points actual search starts from here
     // Rule 1. Checks which give opponent's king at most one escape square are dangerous
     b = kingAtt & ~pos.pieces(them) & ~newAtt & ~(1ULL << to);
 
-    if (!(b && (b & (b - 1))))
+    if (single_bit(b)) // Catches also !b
         return true;
 
     // Rule 2. Queen contact check is very dangerous