aboutsummaryrefslogtreecommitdiff
path: root/backends
diff options
context:
space:
mode:
authorTorbjörn Andersson2010-01-20 00:00:50 +0000
committerTorbjörn Andersson2010-01-20 00:00:50 +0000
commita2edf1cd1608573ccb88e4d701311f5f26148021 (patch)
tree7bae41956c12fbf8a644fffa67e9c560c32885ca /backends
parent24ae816395059b5949d4123798bbe9cef6a82ed3 (diff)
downloadscummvm-rg350-a2edf1cd1608573ccb88e4d701311f5f26148021.tar.gz
scummvm-rg350-a2edf1cd1608573ccb88e4d701311f5f26148021.tar.bz2
scummvm-rg350-a2edf1cd1608573ccb88e4d701311f5f26148021.zip
Fixed cppcheck warnings. I usually stay out of backends I can't compile myself
but this change seemed obvious enough that it should work. svn-id: r47400
Diffstat (limited to 'backends')
-rw-r--r--backends/platform/ds/arm9/source/ramsave.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/backends/platform/ds/arm9/source/ramsave.cpp b/backends/platform/ds/arm9/source/ramsave.cpp
index ff756205ab..f38e36250e 100644
--- a/backends/platform/ds/arm9/source/ramsave.cpp
+++ b/backends/platform/ds/arm9/source/ramsave.cpp
@@ -75,7 +75,7 @@ DSSaveFile::~DSSaveFile() {
DSSaveFileManager::instance()->flushToSaveRAM();
}
if (ownsData) {
- delete saveData;
+ delete[] saveData;
}
}
@@ -98,7 +98,7 @@ bool DSSaveFile::loadFromSaveRAM(vu8* address) {
((char *) (saveData))[t] = *(address + t + sizeof(newSave));
}
- if (ownsData) delete this->saveData;
+ if (ownsData) delete[] this->saveData;
save = newSave;
saveCompressed = true;
this->saveData = saveData;
@@ -119,7 +119,7 @@ void DSSaveFile::compress() {
- delete saveData;
+ delete[] saveData;
// Make the save smaller
saveData = (u8 *) realloc(compBuffer, save.compressedSize);
@@ -282,7 +282,7 @@ void DSSaveFile::clearData() {
if (saveCompressed) {
if (ownsData) {
- delete saveData;
+ delete[] saveData;
DSSaveFileManager::instance()->addBytesFree(getRamUsage());
}
saveData = new unsigned char[DS_MAX_SAVE_SIZE];
@@ -296,7 +296,7 @@ void DSSaveFile::deleteFile() {
if (isValid()) {
if (ownsData) {
DSSaveFileManager::instance()->addBytesFree(getRamUsage());
- delete saveData;
+ delete[] saveData;
saveData = NULL;
}
ptr = 0;