Codechange: Replace window related FOR_ALL with range-based for loops

(cherry picked from commit 14e92bd8e2)
This commit is contained in:
glx22
2021-04-28 21:24:24 +02:00
committed by Jonathan G Rennison
parent c7cac34025
commit dfe616bef4
11 changed files with 130 additions and 156 deletions

View File

@@ -2666,8 +2666,7 @@ struct IndustryCargoesWindow : public Window {
InvalidateWindowClassesData(WC_SMALLMAP, 0);
/* Notify viewports too. */
Window *w;
FOR_ALL_WINDOWS_FROM_BACK(w) {
for (Window *w : Window::IterateFromBack()) {
if (w->viewport != nullptr)
if (w->viewport->zoom >= ZOOM_LVL_DRAW_MAP && w->viewport->map_type == VPMT_INDUSTRY)
w->InvalidateData();