1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-20 13:09:15 +00:00

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

@@ -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);