summaryrefslogtreecommitdiff
path: root/src/widgets
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/widgets
parenta61696d6c565ff92c6604b12eefe36198d094056 (diff)
downloadopenttd-14e92bd8e241998ced263ee542965a71bbdd77a5.tar.xz
Codechange: Replace window related FOR_ALL with range-based for loops
Diffstat (limited to 'src/widgets')
-rw-r--r--src/widgets/dropdown.cpp3
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);