Fix: do not hide parameter by local variable with the same name
This commit is contained in:
@@ -1391,7 +1391,7 @@ CommandCost CmdSellRailWagon(DoCommandFlag flags, Vehicle *t, uint16 data, uint3
|
||||
}
|
||||
|
||||
CommandCost cost(EXPENSES_NEW_VEHICLES);
|
||||
for (Train *t = sell_head; t != nullptr; t = t->Next()) cost.AddCost(-t->value);
|
||||
for (Train *part = sell_head; part != nullptr; part = part->Next()) cost.AddCost(-part->value);
|
||||
|
||||
/* do it? */
|
||||
if (flags & DC_EXEC) {
|
||||
|
Reference in New Issue
Block a user