diff options
author | Einar Johan Trøan Sømåen | 2013-01-26 18:06:42 +0100 |
---|---|---|
committer | Einar Johan Trøan Sømåen | 2013-01-26 18:07:07 +0100 |
commit | 980dc4a456f55a8b6526d2bc6f7694a0b2d666b3 (patch) | |
tree | bef13619df90984b731795e72721da7d39089041 /engines/wintermute/base/sound | |
parent | 6ae97cdfbe88fa34363aabc46847b0c9a32eefe5 (diff) | |
download | scummvm-rg350-980dc4a456f55a8b6526d2bc6f7694a0b2d666b3.tar.gz scummvm-rg350-980dc4a456f55a8b6526d2bc6f7694a0b2d666b3.tar.bz2 scummvm-rg350-980dc4a456f55a8b6526d2bc6f7694a0b2d666b3.zip |
WINTERMUTE: Replace all NULLs with nullptr.
Diffstat (limited to 'engines/wintermute/base/sound')
-rw-r--r-- | engines/wintermute/base/sound/base_sound.cpp | 6 | ||||
-rw-r--r-- | engines/wintermute/base/sound/base_sound_buffer.cpp | 14 | ||||
-rw-r--r-- | engines/wintermute/base/sound/base_sound_manager.cpp | 8 |
3 files changed, 14 insertions, 14 deletions
diff --git a/engines/wintermute/base/sound/base_sound.cpp b/engines/wintermute/base/sound/base_sound.cpp index 00d07cd3c2..f246c03fe1 100644 --- a/engines/wintermute/base/sound/base_sound.cpp +++ b/engines/wintermute/base/sound/base_sound.cpp @@ -36,7 +36,7 @@ namespace Wintermute { IMPLEMENT_PERSISTENT(BaseSound, false) BaseSound::BaseSound(BaseGame *inGame) : BaseClass(inGame) { - _sound = NULL; + _sound = nullptr; _soundFilename = ""; _soundType = Audio::Mixer::kSFXSoundType; @@ -57,13 +57,13 @@ BaseSound::~BaseSound() { if (_sound) { _gameRef->_soundMgr->removeSound(_sound); } - _sound = NULL; + _sound = nullptr; } bool BaseSound::setSound(const Common::String &filename, Audio::Mixer::SoundType type, bool streamed) { if (_sound) { _gameRef->_soundMgr->removeSound(_sound); - _sound = NULL; + _sound = nullptr; } _soundFilename = Common::String(); // Set empty diff --git a/engines/wintermute/base/sound/base_sound_buffer.cpp b/engines/wintermute/base/sound/base_sound_buffer.cpp index d2b265a254..9c919abac6 100644 --- a/engines/wintermute/base/sound/base_sound_buffer.cpp +++ b/engines/wintermute/base/sound/base_sound_buffer.cpp @@ -49,13 +49,13 @@ namespace Wintermute { ////////////////////////////////////////////////////////////////////////// BaseSoundBuffer::BaseSoundBuffer(BaseGame *inGame) : BaseClass(inGame) { - _stream = NULL; - _handle = NULL; -// _sync = NULL; + _stream = nullptr; + _handle = nullptr; +// _sync = nullptr; _streamed = false; _filename = ""; - _file = NULL; + _file = nullptr; _privateVolume = 255; _volume = 255; @@ -76,10 +76,10 @@ BaseSoundBuffer::~BaseSoundBuffer() { if (_handle) { g_system->getMixer()->stopHandle(*_handle); delete _handle; - _handle = NULL; + _handle = nullptr; } delete _stream; - _stream = NULL; + _stream = nullptr; } @@ -134,7 +134,7 @@ bool BaseSoundBuffer::play(bool looping, uint32 startSample) { if (_handle) { g_system->getMixer()->stopHandle(*_handle); delete _handle; - _handle = NULL; + _handle = nullptr; } // Store the loop-value for save-games. setLooping(looping); diff --git a/engines/wintermute/base/sound/base_sound_manager.cpp b/engines/wintermute/base/sound/base_sound_manager.cpp index 7e4a70afb2..c6eb871a85 100644 --- a/engines/wintermute/base/sound/base_sound_manager.cpp +++ b/engines/wintermute/base/sound/base_sound_manager.cpp @@ -94,7 +94,7 @@ bool BaseSoundMgr::initialize() { ////////////////////////////////////////////////////////////////////////// BaseSoundBuffer *BaseSoundMgr::addSound(const Common::String &filename, Audio::Mixer::SoundType type, bool streamed) { if (!_soundAvailable) { - return NULL; + return nullptr; } BaseSoundBuffer *sound; @@ -114,7 +114,7 @@ BaseSoundBuffer *BaseSoundMgr::addSound(const Common::String &filename, Audio::M sound = new BaseSoundBuffer(_gameRef); if (!sound) { - return NULL; + return nullptr; } sound->setStreaming(streamed); @@ -125,7 +125,7 @@ BaseSoundBuffer *BaseSoundMgr::addSound(const Common::String &filename, Audio::M if (DID_FAIL(res)) { _gameRef->LOG(res, "Error loading sound '%s'", useFilename.c_str()); delete sound; - return NULL; + return nullptr; } // Make sure the master-volume is applied to the sound. @@ -136,7 +136,7 @@ BaseSoundBuffer *BaseSoundMgr::addSound(const Common::String &filename, Audio::M return sound; - return NULL; + return nullptr; } ////////////////////////////////////////////////////////////////////////// |