]> git.sesse.net Git - stockfish/blobdiff - src/position.cpp
Assorted trivial cleanups 3/2019 (#2030)
[stockfish] / src / position.cpp
index 2bdf1009b28ce8c006cd5cebd825202310dee943..84892d094a60fd3d770b1af0ba2546724ef7b8a9 100644 (file)
@@ -628,7 +628,7 @@ bool Position::pseudo_legal(const Move m) const {
   {
       // We have already handled promotion moves, so destination
       // cannot be on the 8th/1st rank.
-      if (rank_of(to) == relative_rank(us, RANK_8))
+      if ((Rank8BB | Rank1BB) & to)
           return false;
 
       if (   !(attacks_from<PAWN>(from, us) & pieces(~us) & to) // Not a capture