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

@@ -245,6 +245,7 @@ static void SndPlayScreenCoordFx(SoundID sound, int left, int right, int top, in
{
if (_settings_client.music.effect_vol == 0) return;
/* Iterate from back, so that main viewport is checked first */
for (const Window *w : Window::IterateFromBack()) {
const Viewport *vp = w->viewport;