]> git.sesse.net Git - stockfish/blobdiff - src/position.cpp
Small cleanups.
[stockfish] / src / position.cpp
index de9722fff2b9a098d1fcf5c1cb98a011f878d4df..5efd9c42a5eb351df1c043ea0b1e25a84b28f935 100644 (file)
@@ -633,11 +633,11 @@ bool Position::gives_check(Move m) const {
   Square to = to_sq(m);
 
   // Is there a direct check?
-  if (st->checkSquares[type_of(piece_on(from))] & to)
+  if (check_squares(type_of(piece_on(from))) & to)
       return true;
 
   // Is there a discovered check?
-  if (   (st->blockersForKing[~sideToMove] & from)
+  if (   (blockers_for_king(~sideToMove) & from)
       && !aligned(from, to, square<KING>(~sideToMove)))
       return true;