diff options
author | rubidium42 <rubidium@openttd.org> | 2021-05-26 20:51:17 +0200 |
---|---|---|
committer | rubidium42 <rubidium42@users.noreply.github.com> | 2021-05-27 18:30:56 +0200 |
commit | b791ffc6de6dcc33739bb36bec4824dc44417961 (patch) | |
tree | 0f3c42eee61630369a59623b36e0920fcecb9235 /src/train_cmd.cpp | |
parent | eaa3df1e8e3c9c6f6a22e95d0d4ed8ff251d4af9 (diff) | |
download | openttd-b791ffc6de6dcc33739bb36bec4824dc44417961.tar.xz |
Fix: do not hide parameter by local variable with the same name
Diffstat (limited to 'src/train_cmd.cpp')
-rw-r--r-- | src/train_cmd.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/train_cmd.cpp b/src/train_cmd.cpp index 3b1667094..0a3a5db9e 100644 --- a/src/train_cmd.cpp +++ b/src/train_cmd.cpp @@ -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) { |