Codechange: Replace FOR_ALL_OBJECTS with range-based for loops

This commit is contained in:
glx
2019-12-17 19:05:46 +01:00
committed by Niels Martin Hansen
parent 11f178a312
commit 514565fad6
6 changed files with 8 additions and 20 deletions

View File

@@ -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;