diff options
author | glx <glx@openttd.org> | 2019-12-14 17:22:38 +0100 |
---|---|---|
committer | Niels Martin Hansen <nielsm@indvikleren.dk> | 2019-12-21 20:13:03 +0100 |
commit | 3a14cea068d130e11b5d9dde11d4451dd7dec453 (patch) | |
tree | 7afd5a1160872aeba8a630c2915a8168cbc483dd /src/elrail.cpp | |
parent | 68f22134cb35267d6fa01134a385d3854fda1787 (diff) | |
download | openttd-3a14cea068d130e11b5d9dde11d4451dd7dec453.tar.xz |
Codechange: Replace FOR_ALL_COMPANIES with range-based for loops
Diffstat (limited to 'src/elrail.cpp')
-rw-r--r-- | src/elrail.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/elrail.cpp b/src/elrail.cpp index db5a89be5..b169479da 100644 --- a/src/elrail.cpp +++ b/src/elrail.cpp @@ -591,7 +591,6 @@ void DrawRailCatenary(const TileInfo *ti) bool SettingsDisableElrail(int32 p1) { - Company *c; Train *t; bool disable = (p1 != 0); @@ -632,7 +631,7 @@ bool SettingsDisableElrail(int32 p1) } } - FOR_ALL_COMPANIES(c) c->avail_railtypes = GetCompanyRailtypes(c->index); + for (Company *c : Company::Iterate()) c->avail_railtypes = GetCompanyRailtypes(c->index); /* This resets the _last_built_railtype, which will be invalid for electric * rails. It may have unintended consequences if that function is ever |