]> git.sesse.net Git - stockfish/blobdiff - src/bitboard.cpp
Better document square flipping helpers
[stockfish] / src / bitboard.cpp
index 6a3c18204667b4c0b8c010592ea9fe26a2e333e6..41ce2955c147f27b2960130d0c2ec2ffa8c7d5f7 100644 (file)
@@ -236,7 +236,7 @@ void Bitboards::init() {
               {
                   Square to = s + Square(c == WHITE ? steps[pt][k] : -steps[pt][k]);
 
-                  if (square_is_ok(to) && square_distance(s, to) < 3)
+                  if (is_ok(to) && square_distance(s, to) < 3)
                       StepAttacksBB[make_piece(c, pt)][s] |= to;
               }
 
@@ -273,7 +273,7 @@ namespace {
 
     for (int i = 0; i < 4; i++)
         for (Square s = sq + deltas[i];
-             square_is_ok(s) && square_distance(s, s - deltas[i]) == 1;
+             is_ok(s) && square_distance(s, s - deltas[i]) == 1;
              s += deltas[i])
         {
             attack |= s;