summaryrefslogtreecommitdiff
path: root/src/misc_gui.cpp
diff options
context:
space:
mode:
authorglx22 <glx@openttd.org>2021-04-28 21:24:24 +0200
committerLoïc Guilloux <glx22@users.noreply.github.com>2021-04-29 21:08:24 +0200
commit14e92bd8e241998ced263ee542965a71bbdd77a5 (patch)
tree08490feac7c2c15c97daee67dc3c1329fc703a95 /src/misc_gui.cpp
parenta61696d6c565ff92c6604b12eefe36198d094056 (diff)
downloadopenttd-14e92bd8e241998ced263ee542965a71bbdd77a5.tar.xz
Codechange: Replace window related FOR_ALL with range-based for loops
Diffstat (limited to 'src/misc_gui.cpp')
-rw-r--r--src/misc_gui.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/misc_gui.cpp b/src/misc_gui.cpp
index 9be207ac6..b2de45140 100644
--- a/src/misc_gui.cpp
+++ b/src/misc_gui.cpp
@@ -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;