]> git.sesse.net Git - stockfish/blobdiff - src/position.cpp
Remove redundant condition from capture_stage()
[stockfish] / src / position.cpp
index 37aa2e9edec97b3812f646d4f38da67168e0b4a5..632a40b5d617658dbb6bb188a4d6e12ca4b96449 100644 (file)
@@ -569,8 +569,7 @@ bool Position::pseudo_legal(const Move m) const {
                         : 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.