summaryrefslogtreecommitdiff
path: root/src/sound.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2009-02-11 00:01:36 +0100
committerBjørn Lindeijer <bjorn@lindeijer.nl>2009-02-11 00:01:36 +0100
commitdbc6444d3086fa1b7afca4605600a0a0ae8ca394 (patch)
tree929a30503728e9f657c9a8820b3a9069b916343e /src/sound.cpp
parent8712ce09e8f3a86dcf2f6c8ee7d030e3b41a4618 (diff)
downloadmana-dbc6444d3086fa1b7afca4605600a0a0ae8ca394.tar.gz
mana-dbc6444d3086fa1b7afca4605600a0a0ae8ca394.tar.bz2
mana-dbc6444d3086fa1b7afca4605600a0a0ae8ca394.tar.xz
mana-dbc6444d3086fa1b7afca4605600a0a0ae8ca394.zip
Removed many pointless comparisons with NULL
Sometimes it's nice for clarity, but most of the time this is just clutter. C++ != Java. :)
Diffstat (limited to 'src/sound.cpp')
-rw-r--r--src/sound.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/sound.cpp b/src/sound.cpp
index 78538c09..6e0b0da0 100644
--- a/src/sound.cpp
+++ b/src/sound.cpp
@@ -128,7 +128,7 @@ void Sound::playMusic(const std::string &filename, int loop)
{
if (!mInstalled) return;
- if (mMusic != NULL) {
+ if (mMusic) {
stopMusic();
}
@@ -154,7 +154,7 @@ void Sound::stopMusic()
logger->log("Sound::stopMusic()");
- if (mMusic != NULL) {
+ if (mMusic) {
Mix_HaltMusic();
Mix_FreeMusic(mMusic);
mMusic = NULL;
@@ -165,7 +165,7 @@ void Sound::fadeInMusic(const std::string &path, int loop, int ms)
{
if (!mInstalled) return;
- if (mMusic != NULL) {
+ if (mMusic) {
stopMusic();
}
@@ -188,7 +188,7 @@ void Sound::fadeOutMusic(int ms)
logger->log("Sound::fadeOutMusic() Fading-out (%i ms)", ms);
- if (mMusic != NULL) {
+ if (mMusic) {
Mix_FadeOutMusic(ms);
Mix_FreeMusic(mMusic);
mMusic = NULL;