diff options
author | Torbjörn Andersson | 2010-01-03 19:37:43 +0000 |
---|---|---|
committer | Torbjörn Andersson | 2010-01-03 19:37:43 +0000 |
commit | 72eb9ec9eab5efcb3aa99a962a80423e8c0a3232 (patch) | |
tree | 032c9107838aefca6a166465a46fa7318bb82566 /common | |
parent | 910ffb53a0b6c74a965df9a1270cdfc3885252ec (diff) | |
download | scummvm-rg350-72eb9ec9eab5efcb3aa99a962a80423e8c0a3232.tar.gz scummvm-rg350-72eb9ec9eab5efcb3aa99a962a80423e8c0a3232.tar.bz2 scummvm-rg350-72eb9ec9eab5efcb3aa99a962a80423e8c0a3232.zip |
Fixed a bunch of cppcheck warnings. Mostly about checking if a pointer is null
before freeing it, which isn't necessary.
svn-id: r46941
Diffstat (limited to 'common')
-rw-r--r-- | common/EventDispatcher.cpp | 3 | ||||
-rw-r--r-- | common/EventRecorder.cpp | 8 |
2 files changed, 3 insertions, 8 deletions
diff --git a/common/EventDispatcher.cpp b/common/EventDispatcher.cpp index a77c527969..d295cb9f81 100644 --- a/common/EventDispatcher.cpp +++ b/common/EventDispatcher.cpp @@ -72,8 +72,7 @@ void EventDispatcher::dispatch() { } void EventDispatcher::registerMapper(EventMapper *mapper) { - if (_mapper) - delete _mapper; + delete _mapper; _mapper = mapper; } diff --git a/common/EventRecorder.cpp b/common/EventRecorder.cpp index aea17d8f89..47ab3da3d6 100644 --- a/common/EventRecorder.cpp +++ b/common/EventRecorder.cpp @@ -203,12 +203,8 @@ void EventRecorder::deinit() { g_system->unlockMutex(_timeMutex); g_system->unlockMutex(_recorderMutex); - if (_playbackFile != NULL) { - delete _playbackFile; - } - if (_playbackTimeFile != NULL) { - delete _playbackTimeFile; - } + delete _playbackFile; + delete _playbackTimeFile; if (_recordFile != NULL) { _recordFile->finalize(); |