aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorJohannes Schickel2009-09-13 21:48:02 +0000
committerJohannes Schickel2009-09-13 21:48:02 +0000
commitb6d33f1667ecd2e8bb1b16b85f5db4bae2046054 (patch)
tree2dec2e5c39a4989398e0d296350ed64406c75919 /engines
parentb73f9ab41ecada2a9971834e1ef1bb4c106cbec3 (diff)
downloadscummvm-rg350-b6d33f1667ecd2e8bb1b16b85f5db4bae2046054.tar.gz
scummvm-rg350-b6d33f1667ecd2e8bb1b16b85f5db4bae2046054.tar.bz2
scummvm-rg350-b6d33f1667ecd2e8bb1b16b85f5db4bae2046054.zip
- Cleanup
- Fix mismatching new[]/delete svn-id: r44075
Diffstat (limited to 'engines')
-rw-r--r--engines/kyra/sound.h6
-rw-r--r--engines/kyra/sound_adlib.h1
-rw-r--r--engines/kyra/sound_towns.cpp4
3 files changed, 5 insertions, 6 deletions
diff --git a/engines/kyra/sound.h b/engines/kyra/sound.h
index e81b18d8a4..09a87b6d87 100644
--- a/engines/kyra/sound.h
+++ b/engines/kyra/sound.h
@@ -110,14 +110,14 @@ public:
/**
* Load hard coded data for playing music
* (and somtimes sound effects) from.
- */
- virtual void loadSoundFile(const uint8 *data, int len) { }
+ */
+ virtual void loadSoundFile(const uint8 *data, int len) {}
/**
* Load a sound file for playing sound
* effects from.
*/
- virtual void loadSfxFile(Common::String file) { }
+ virtual void loadSfxFile(Common::String file) {}
/**
* Plays the specified track.
diff --git a/engines/kyra/sound_adlib.h b/engines/kyra/sound_adlib.h
index e85beff813..f384113af7 100644
--- a/engines/kyra/sound_adlib.h
+++ b/engines/kyra/sound_adlib.h
@@ -72,7 +72,6 @@ public:
void loadSoundFile(uint file);
void loadSoundFile(Common::String file);
- void loadSoundFile(const uint8 *data, int len) {}
void playTrack(uint8 track);
void haltTrack();
diff --git a/engines/kyra/sound_towns.cpp b/engines/kyra/sound_towns.cpp
index 0c67b1e83a..ffa9f720a7 100644
--- a/engines/kyra/sound_towns.cpp
+++ b/engines/kyra/sound_towns.cpp
@@ -4075,14 +4075,14 @@ bool SoundPC98::init() {
void SoundPC98::loadSoundFile(Common::String file) {
if (_sfxTrackData)
- delete _sfxTrackData;
+ delete[] _sfxTrackData;
_sfxTrackData = _vm->resource()->fileData(file.c_str(), 0);
}
void SoundPC98::loadSoundFile(const uint8 *data, int len) {
if (_sfxTrackData)
- delete _sfxTrackData;
+ delete[] _sfxTrackData;
_sfxTrackData = new uint8[len];
memcpy(_sfxTrackData, data, len);