summaryrefslogtreecommitdiff
path: root/src/script
diff options
context:
space:
mode:
authorglx22 <glx@openttd.org>2021-04-29 17:51:05 +0200
committerLoïc Guilloux <glx22@users.noreply.github.com>2021-04-29 21:08:24 +0200
commit9a8756d7ed6fdde20bad9be8c8b8bc8fda0170f9 (patch)
tree54941350dff9cc05ee0e9b32e116df385f977a46 /src/script
parent14e92bd8e241998ced263ee542965a71bbdd77a5 (diff)
downloadopenttd-9a8756d7ed6fdde20bad9be8c8b8bc8fda0170f9.tar.xz
Codechange: Replace FOR_ALL_CARGOSPECS with range-based for loops
Diffstat (limited to 'src/script')
-rw-r--r--src/script/api/script_cargolist.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/script/api/script_cargolist.cpp b/src/script/api/script_cargolist.cpp
index fbd150c6c..0019dc5e9 100644
--- a/src/script/api/script_cargolist.cpp
+++ b/src/script/api/script_cargolist.cpp
@@ -19,8 +19,7 @@
ScriptCargoList::ScriptCargoList()
{
- const CargoSpec *cs;
- FOR_ALL_CARGOSPECS(cs) {
+ for (const CargoSpec *cs : CargoSpec::Iterate()) {
this->AddItem(cs->Index());
}
}