Change a non functional promotion check to an assert.
closes https://github.com/official-stockfish/Stockfish/pull/4436
No functional change
: MoveList<NON_EVASIONS>(*this).contains(m);
// Is not a promotion, so promotion piece must be empty
- if (promotion_type(m) - KNIGHT != NO_PIECE_TYPE)
- return false;
+ assert(promotion_type(m) - KNIGHT == NO_PIECE_TYPE);
// If the 'from' square is not occupied by a piece belonging to the side to
// move, the move is obviously not legal.
// is needed to avoid the generation of duplicate moves.
inline bool Position::capture_stage(Move m) const {
assert(is_ok(m));
- return capture(m) || (type_of(m) == PROMOTION && promotion_type(m) == QUEEN);
+ return capture(m) || promotion_type(m) == QUEEN;
}
inline Piece Position::captured_piece() const {