diff --git a/src/company_cmd.cpp b/src/company_cmd.cpp --- a/src/company_cmd.cpp +++ b/src/company_cmd.cpp @@ -1025,8 +1025,7 @@ CommandCost CmdSetCompanyColour(TileInde 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(); }