From 76c13beef0099a8e9677ddd10cb1a96aab1fb1ae Mon Sep 17 00:00:00 2001 From: frosch Date: Sat, 27 Sep 2008 17:08:03 +0000 Subject: [PATCH] (svn r14407) -Cleanup (r14406): Remove a redundant test. (thanks SmatZ) --- src/autoreplace_cmd.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/autoreplace_cmd.cpp b/src/autoreplace_cmd.cpp index 227ba19a44..0cafcaf1de 100644 --- a/src/autoreplace_cmd.cpp +++ b/src/autoreplace_cmd.cpp @@ -382,10 +382,8 @@ static CommandCost ReplaceFreeUnit(Vehicle **single_unit, uint32 flags, bool *no *single_unit = new_v; } - if (cost.Succeeded()) { - /* Sell the old vehicle */ - cost.AddCost(DoCommand(0, old_v->index, 0, flags, GetCmdSellVeh(old_v))); - } + /* Sell the old vehicle */ + cost.AddCost(DoCommand(0, old_v->index, 0, flags, GetCmdSellVeh(old_v))); /* If we are not in DC_EXEC undo everything */ if ((flags & DC_EXEC) == 0) {