# HG changeset patch # User frosch # Date 2008-09-27 17:08:03 # Node ID 7e7dbb50ce31e79ae692ad0d7d2661ae3bcc8227 # Parent 9b282b96cd44836eef89fef0c5ff2f7f16aa3ce5 (svn r14407) -Cleanup (r14406): Remove a redundant test. (thanks SmatZ) diff --git a/src/autoreplace_cmd.cpp b/src/autoreplace_cmd.cpp --- a/src/autoreplace_cmd.cpp +++ b/src/autoreplace_cmd.cpp @@ -382,10 +382,8 @@ static CommandCost ReplaceFreeUnit(Vehic *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) {