mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-04 18:06:26 +00:00
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
This commit is contained in:
parent
24ae816395
commit
a2edf1cd16
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user