diff options
author | glx22 <glx@openttd.org> | 2021-04-28 21:24:24 +0200 |
---|---|---|
committer | Loïc Guilloux <glx22@users.noreply.github.com> | 2021-04-29 21:08:24 +0200 |
commit | 14e92bd8e241998ced263ee542965a71bbdd77a5 (patch) | |
tree | 08490feac7c2c15c97daee67dc3c1329fc703a95 /src/widgets/dropdown.cpp | |
parent | a61696d6c565ff92c6604b12eefe36198d094056 (diff) | |
download | openttd-14e92bd8e241998ced263ee542965a71bbdd77a5.tar.xz |
Codechange: Replace window related FOR_ALL with range-based for loops
Diffstat (limited to 'src/widgets/dropdown.cpp')
-rw-r--r-- | src/widgets/dropdown.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/widgets/dropdown.cpp b/src/widgets/dropdown.cpp index 6b1debb9d..f5536f52f 100644 --- a/src/widgets/dropdown.cpp +++ b/src/widgets/dropdown.cpp @@ -505,8 +505,7 @@ void ShowDropDownMenu(Window *w, const StringID *strings, int selected, int butt */ int HideDropDownMenu(Window *pw) { - Window *w; - FOR_ALL_WINDOWS_FROM_BACK(w) { + for (Window *w : Window::IterateFromBack()) { if (w->window_class != WC_DROPDOWN_MENU) continue; DropdownWindow *dw = dynamic_cast<DropdownWindow*>(w); |