summaryrefslogtreecommitdiff
path: root/src/autoreplace_cmd.cpp
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2008-09-27 17:08:03 +0000
committerfrosch <frosch@openttd.org>2008-09-27 17:08:03 +0000
commite8038cbf5856ad19ce0933ed08b4705c46cf49f4 (patch)
treea5059a021e78e1b38f75bcc8e8f01d6834a89b0f /src/autoreplace_cmd.cpp
parent32289ebd637c84127281c0aea6068577f8966f93 (diff)
downloadopenttd-e8038cbf5856ad19ce0933ed08b4705c46cf49f4.tar.xz
(svn r14407) -Cleanup (r14406): Remove a redundant test. (thanks SmatZ)
Diffstat (limited to 'src/autoreplace_cmd.cpp')
-rw-r--r--src/autoreplace_cmd.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/autoreplace_cmd.cpp b/src/autoreplace_cmd.cpp
index 227ba19a4..0cafcaf1d 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) {