From d8a1be48cd60c690235de175e9a044b95f92ea28 Mon Sep 17 00:00:00 2001 From: glx Date: Tue, 17 Dec 2019 03:37:43 +0100 Subject: Codechange: Replace vehicle related FOR_ALL with range-based for loops --- src/company_cmd.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/company_cmd.cpp') diff --git a/src/company_cmd.cpp b/src/company_cmd.cpp index 4fa8eced2..6308c1447 100644 --- a/src/company_cmd.cpp +++ b/src/company_cmd.cpp @@ -1025,8 +1025,7 @@ CommandCost CmdSetCompanyColour(TileIndex tile, DoCommandFlag flags, uint32 p1, InvalidateWindowData(WC_SMALLMAP, 0, 1); /* Company colour data is indirectly cached. */ - Vehicle *v; - FOR_ALL_VEHICLES(v) { + for (Vehicle *v : Vehicle::Iterate()) { if (v->owner == _current_company) v->InvalidateNewGRFCache(); } -- cgit v1.2.3-54-g00ecf