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

Codechange: use IterateFromBack/Front only if the order is important.

Use Iterate if the order does not matter.
This commit is contained in:
frosch
2021-05-09 17:10:07 +02:00
committed by frosch
parent 22567a1f43
commit f96f113951
6 changed files with 41 additions and 39 deletions

View File

@@ -501,7 +501,7 @@ void ShowDropDownMenu(Window *w, const StringID *strings, int selected, int butt
*/
int HideDropDownMenu(Window *pw)
{
for (Window *w : Window::IterateFromBack()) {
for (Window *w : Window::Iterate()) {
if (w->window_class != WC_DROPDOWN_MENU) continue;
DropdownWindow *dw = dynamic_cast<DropdownWindow*>(w);