diff options
Diffstat (limited to 'src/autoreplace_cmd.cpp')
-rw-r--r-- | src/autoreplace_cmd.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/autoreplace_cmd.cpp b/src/autoreplace_cmd.cpp index bb2cf0b02..26a92e519 100644 --- a/src/autoreplace_cmd.cpp +++ b/src/autoreplace_cmd.cpp @@ -50,9 +50,7 @@ static bool EnginesHaveCargoInCommon(EngineID engine_a, EngineID engine_b) */ bool CheckAutoreplaceValidity(EngineID from, EngineID to, CompanyID company) { - /* First we make sure that it's a valid type the user requested - * check that it's an engine that is in the engine array */ - if (!Engine::IsValidID(from) || !Engine::IsValidID(to)) return false; + assert(Engine::IsValidID(from) && Engine::IsValidID(to)); /* we can't replace an engine into itself (that would be autorenew) */ if (from == to) return false; |