diff options
Diffstat (limited to 'src/autoreplace.cpp')
-rw-r--r-- | src/autoreplace.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/autoreplace.cpp b/src/autoreplace.cpp index ff3544fba..4c963d3d9 100644 --- a/src/autoreplace.cpp +++ b/src/autoreplace.cpp @@ -57,10 +57,8 @@ EngineID EngineReplacement(EngineRenewList erl, EngineID engine, GroupID group) CommandCost AddEngineReplacement(EngineRenewList *erl, EngineID old_engine, EngineID new_engine, GroupID group, DoCommandFlag flags) { - EngineRenew *er; - /* Check if the old vehicle is already in the list */ - er = GetEngineReplacement(*erl, old_engine, group); + EngineRenew *er = GetEngineReplacement(*erl, old_engine, group); if (er != NULL) { if (flags & DC_EXEC) er->to = new_engine; return CommandCost(); |