X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fmovegen.cpp;h=ff8f6c6e16f6f2f186e27dad9972f43b8cf9bb1f;hb=2a461b4b745b2542f6e13bab8c60abdb366bc128;hp=7558c89d63d6847261f6d3a62b3c63263d2d7ff4;hpb=8bec65029d6ac3b22b956cfd820ec754420052df;p=stockfish diff --git a/src/movegen.cpp b/src/movegen.cpp index 7558c89d..ff8f6c6e 100644 --- a/src/movegen.cpp +++ b/src/movegen.cpp @@ -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)); } @@ -864,7 +864,7 @@ namespace { Bitboard blockSquares, MoveStack* mlist) { // Calculate our parametrized parameters at compile time - const Bitboard TRank8BB = (Us == WHITE ? Rank8BB : Rank1BB); + const Rank TRANK_8 = (Us == WHITE ? RANK_8 : RANK_1); const Bitboard TRank3BB = (Us == WHITE ? Rank3BB : Rank6BB); const SquareDelta TDELTA_N = (Us == WHITE ? DELTA_N : DELTA_S); @@ -882,7 +882,7 @@ namespace { assert(pos.piece_on(to) == EMPTY); - if (square_rank(to) == TRank8BB) + if (square_rank(to) == TRANK_8) { (*mlist++).move = make_promotion_move(to - TDELTA_N, to, QUEEN); (*mlist++).move = make_promotion_move(to - TDELTA_N, to, ROOK);