]> git.sesse.net Git - stockfish/blobdiff - src/movegen.cpp
Micro optimize and rename move_promotion()
[stockfish] / src / movegen.cpp
index 7558c89d63d6847261f6d3a62b3c63263d2d7ff4..33da450ec8e0452eb90daafed75df7cd91740ec1 100644 (file)
@@ -506,7 +506,7 @@ bool move_is_legal(const Position& pos, const Move m, Bitboard pinned) {
       // be a promotion.
       if (   (  (square_rank(to) == RANK_8 && us == WHITE)
               ||(square_rank(to) == RANK_1 && us != WHITE))
-           && !move_promotion(m))
+           && !move_is_promotion(m))
           return false;
 
       // Proceed according to the square delta between the source and
@@ -560,7 +560,7 @@ bool move_is_legal(const Position& pos, const Move m, Bitboard pinned) {
   // Luckly we can handle all the other pieces in one go
   return (   pos.piece_attacks_square(pos.piece_on(from), from, to)
           && pos.pl_move_is_legal(m, pinned)
-          && !move_promotion(m));
+          && !move_is_promotion(m));
 }