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

This commit is contained in:
glx22
2021-04-28 21:24:24 +02:00
committed by Loïc Guilloux
parent a61696d6c5
commit 14e92bd8e2
6 changed files with 113 additions and 106 deletions

View File

@@ -1284,8 +1284,7 @@ void ShowQuery(StringID caption, StringID message, Window *parent, QueryCallback
{
if (parent == nullptr) parent = FindWindowById(WC_MAIN_WINDOW, 0);
const Window *w;
FOR_ALL_WINDOWS_FROM_BACK(w) {
for (const Window *w : Window::IterateFromBack()) {
if (w->window_class != WC_CONFIRM_POPUP_QUERY) continue;
const QueryWindow *qw = (const QueryWindow *)w;