From ac019c263d7b41742934a9dafd58ac2e6171109c Mon Sep 17 00:00:00 2001 From: Piotr Dziwinski Date: Sat, 9 Aug 2014 22:45:07 +0200 Subject: Remove unnecessary delete checks (#318) --- src/sound/oalsound/alsound.cpp | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'src/sound/oalsound') diff --git a/src/sound/oalsound/alsound.cpp b/src/sound/oalsound/alsound.cpp index 8afbdd2..327bb6f 100644 --- a/src/sound/oalsound/alsound.cpp +++ b/src/sound/oalsound/alsound.cpp @@ -58,20 +58,14 @@ void ALSound::CleanUp() delete channel.second; } - if (m_currentMusic) - { - delete m_currentMusic; - } - + delete m_currentMusic; + for (auto item : m_oldMusic) { delete item.music; } - - if (m_previousMusic.music) - { - delete m_previousMusic.music; - } + + delete m_previousMusic.music; for (auto item : m_sounds) { -- cgit v1.2.3-1-g7c22