summaryrefslogtreecommitdiffstats
path: root/src/sound
diff options
context:
space:
mode:
authorPiotr Dziwinski <piotrdz@gmail.com>2014-08-09 22:45:07 +0200
committerPiotr Dziwinski <piotrdz@gmail.com>2014-08-09 22:45:07 +0200
commitac019c263d7b41742934a9dafd58ac2e6171109c (patch)
treed5bdab624eac1a92925e6abcaf82c868485f202b /src/sound
parentea0615ee05b0812f2bb5d7d8b970b3f83999a319 (diff)
downloadcolobot-ac019c263d7b41742934a9dafd58ac2e6171109c.tar.gz
colobot-ac019c263d7b41742934a9dafd58ac2e6171109c.tar.bz2
colobot-ac019c263d7b41742934a9dafd58ac2e6171109c.zip
Remove unnecessary delete checks (#318)
Diffstat (limited to 'src/sound')
-rw-r--r--src/sound/oalsound/alsound.cpp14
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)
{