diff options
author | Piotr Dziwinski <piotrdz@gmail.com> | 2014-08-09 22:45:07 +0200 |
---|---|---|
committer | Piotr Dziwinski <piotrdz@gmail.com> | 2014-08-09 22:45:07 +0200 |
commit | ac019c263d7b41742934a9dafd58ac2e6171109c (patch) | |
tree | d5bdab624eac1a92925e6abcaf82c868485f202b /src/sound/oalsound | |
parent | ea0615ee05b0812f2bb5d7d8b970b3f83999a319 (diff) | |
download | colobot-ac019c263d7b41742934a9dafd58ac2e6171109c.tar.gz colobot-ac019c263d7b41742934a9dafd58ac2e6171109c.tar.bz2 colobot-ac019c263d7b41742934a9dafd58ac2e6171109c.zip |
Remove unnecessary delete checks (#318)
Diffstat (limited to 'src/sound/oalsound')
-rw-r--r-- | src/sound/oalsound/alsound.cpp | 14 |
1 files changed, 4 insertions, 10 deletions
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) { |