Fix: do not hide parameter by local variable with the same name

This commit is contained in:
rubidium42
2021-05-26 20:51:17 +02:00
committed by rubidium42
parent eaa3df1e8e
commit b791ffc6de
14 changed files with 130 additions and 130 deletions

View File

@@ -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) {