summaryrefslogtreecommitdiff
path: root/src/sound.cpp
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/sound.cpp
parenta61696d6c565ff92c6604b12eefe36198d094056 (diff)
downloadopenttd-14e92bd8e241998ced263ee542965a71bbdd77a5.tar.xz
Codechange: Replace window related FOR_ALL with range-based for loops
Diffstat (limited to 'src/sound.cpp')
-rw-r--r--src/sound.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/sound.cpp b/src/sound.cpp
index 7d70fa760..d91476729 100644
--- a/src/sound.cpp
+++ b/src/sound.cpp
@@ -238,8 +238,7 @@ static void SndPlayScreenCoordFx(SoundID sound, int left, int right, int top, in
{
if (_settings_client.music.effect_vol == 0) return;
- const Window *w;
- FOR_ALL_WINDOWS_FROM_BACK(w) {
+ for (const Window *w : Window::IterateFromBack()) {
const Viewport *vp = w->viewport;
if (vp != nullptr &&