]> git.sesse.net Git - stockfish/blobdiff - src/position.cpp
Use more_than_one() instead of single_bit()
[stockfish] / src / position.cpp
index e5e0ab06d6eff97946b800ae8ff7bbf159cfa198..6458bb39d6d3703c80c52bb6ead08cfeb4fe1190 100644 (file)
@@ -364,9 +364,9 @@ Bitboard Position::hidden_checkers() const {
 
   while (pinners)
   {
-      b = squares_between(ksq, pop_1st_bit(&pinners)) & pieces();
+      b = between_bb(ksq, pop_1st_bit(&pinners)) & pieces();
 
-      if (b && single_bit(b) && (b & pieces(sideToMove)))
+      if (b && !more_than_one(b) && (b & pieces(sideToMove)))
           result |= b;
   }
   return result;
@@ -608,7 +608,7 @@ bool Position::is_pseudo_legal(const Move m) const {
               return false;
 
           // Our move must be a blocking evasion or a capture of the checking piece
-          if (!((squares_between(checksq, king_square(us)) | checkers()) & to))
+          if (!((between_bb(checksq, king_square(us)) | checkers()) & to))
               return false;
       }
       // In case of king moves under check we have to remove king so to catch