- Square to = pop_1st_bit(&b);
-
- if (Type == MV_CAPTURE || Type == MV_EVASION || Type == MV_NON_EVASION)
- (*mlist++).move = make_promotion(to - Delta, to, QUEEN);
-
- if (Type == MV_NON_CAPTURE || Type == MV_EVASION || Type == MV_NON_EVASION)
- {
- (*mlist++).move = make_promotion(to - Delta, to, ROOK);
- (*mlist++).move = make_promotion(to - Delta, to, BISHOP);
- (*mlist++).move = make_promotion(to - Delta, to, KNIGHT);
- }
-
- // Knight-promotion is the only one that can give a check (direct or
- // discovered) not already included in the queen-promotion.
- if (Type == MV_NON_CAPTURE_CHECK && bit_is_set(StepAttacksBB[W_KNIGHT][to], ksq))
- (*mlist++).move = make_promotion(to - Delta, to, KNIGHT);
- else
- (void)ksq; // Silence a warning under MSVC
+ *moveList++ = make<PROMOTION>(to - D, to, ROOK);
+ *moveList++ = make<PROMOTION>(to - D, to, BISHOP);
+ *moveList++ = make<PROMOTION>(to - D, to, KNIGHT);