[Scummvm-cvs-logs] SF.net SVN: scummvm:[47400] scummvm/trunk/backends/platform/ds/arm9/source/ ramsave.cpp
eriktorbjorn at users.sourceforge.net
eriktorbjorn at users.sourceforge.net
Wed Jan 20 01:00:58 CET 2010
Revision: 47400
http://scummvm.svn.sourceforge.net/scummvm/?rev=47400&view=rev
Author: eriktorbjorn
Date: 2010-01-20 00:00:50 +0000 (Wed, 20 Jan 2010)
Log Message:
-----------
Fixed cppcheck warnings. I usually stay out of backends I can't compile myself
but this change seemed obvious enough that it should work.
Modified Paths:
--------------
scummvm/trunk/backends/platform/ds/arm9/source/ramsave.cpp
Modified: scummvm/trunk/backends/platform/ds/arm9/source/ramsave.cpp
===================================================================
--- scummvm/trunk/backends/platform/ds/arm9/source/ramsave.cpp 2010-01-19 23:52:49 UTC (rev 47399)
+++ scummvm/trunk/backends/platform/ds/arm9/source/ramsave.cpp 2010-01-20 00:00:50 UTC (rev 47400)
@@ -75,7 +75,7 @@
DSSaveFileManager::instance()->flushToSaveRAM();
}
if (ownsData) {
- delete saveData;
+ delete[] saveData;
}
}
@@ -98,7 +98,7 @@
((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 @@
- delete saveData;
+ delete[] saveData;
// Make the save smaller
saveData = (u8 *) realloc(compBuffer, save.compressedSize);
@@ -282,7 +282,7 @@
if (saveCompressed) {
if (ownsData) {
- delete saveData;
+ delete[] saveData;
DSSaveFileManager::instance()->addBytesFree(getRamUsage());
}
saveData = new unsigned char[DS_MAX_SAVE_SIZE];
@@ -296,7 +296,7 @@
if (isValid()) {
if (ownsData) {
DSSaveFileManager::instance()->addBytesFree(getRamUsage());
- delete saveData;
+ delete[] saveData;
saveData = NULL;
}
ptr = 0;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list