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/statusbar_gui.cpp | |
parent | 68f22134cb35267d6fa01134a385d3854fda1787 (diff) | |
download | openttd-3a14cea068d130e11b5d9dde11d4451dd7dec453.tar.xz |
Codechange: Replace FOR_ALL_COMPANIES with range-based for loops
Diffstat (limited to 'src/statusbar_gui.cpp')
-rw-r--r-- | src/statusbar_gui.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/statusbar_gui.cpp b/src/statusbar_gui.cpp index 3f4396704..322e196df 100644 --- a/src/statusbar_gui.cpp +++ b/src/statusbar_gui.cpp @@ -120,8 +120,7 @@ struct StatusBarWindow : Window { case WID_S_RIGHT: { int64 max_money = UINT32_MAX; - const Company *c; - FOR_ALL_COMPANIES(c) max_money = max<int64>(c->money, max_money); + for (const Company *c : Company::Iterate()) max_money = max<int64>(c->money, max_money); SetDParam(0, 100LL * max_money); d = GetStringBoundingBox(STR_COMPANY_MONEY); break; |