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

@@ -1289,7 +1289,7 @@ void ShowQuery(StringID caption, StringID message, Window *parent, QueryCallback
{
if (parent == nullptr) parent = FindWindowById(WC_MAIN_WINDOW, 0);
for (const Window *w : Window::IterateFromBack()) {
for (const Window *w : Window::Iterate()) {
if (w->window_class != WC_CONFIRM_POPUP_QUERY) continue;
const QueryWindow *qw = (const QueryWindow *)w;