summaryrefslogtreecommitdiff
path: root/src/object_cmd.cpp
diff options
context:
space:
mode:
authorglx <glx@openttd.org>2019-12-17 19:05:46 +0100
committerNiels Martin Hansen <nielsm@indvikleren.dk>2019-12-21 20:13:03 +0100
commit514565fad6d3a7e93a24b53b29eb901ef4f6a166 (patch)
treebadaf632dd5047e6be442e606bee956184845479 /src/object_cmd.cpp
parent11f178a312d1a601aa14f9188f05f4a4cd033cf9 (diff)
downloadopenttd-514565fad6d3a7e93a24b53b29eb901ef4f6a166.tar.xz
Codechange: Replace FOR_ALL_OBJECTS with range-based for loops
Diffstat (limited to 'src/object_cmd.cpp')
-rw-r--r--src/object_cmd.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/object_cmd.cpp b/src/object_cmd.cpp
index 1e34b78d8..3fb61d647 100644
--- a/src/object_cmd.cpp
+++ b/src/object_cmd.cpp
@@ -173,8 +173,7 @@ void UpdateCompanyHQ(TileIndex tile, uint score)
*/
void UpdateObjectColours(const Company *c)
{
- Object *obj;
- FOR_ALL_OBJECTS(obj) {
+ for (Object *obj : Object::Iterate()) {
Owner owner = GetTileOwner(obj->location.tile);
/* Not the current owner, so colour doesn't change. */
if (owner != c->index) continue;