mirror of
https://bitbucket.org/theswgsource/src-1.2.git
synced 2026-07-14 00:01:30 -04:00
recommit the innocuous fixes from cppcheck - the va_end calls were deleting pointers and breaking things further down the line
This commit is contained in:
@@ -278,9 +278,9 @@ void FileManifest::addNewManifestEntry(const char *fileName, int fileSize)
|
||||
if (fileSize)
|
||||
((insertReturn.first)->second)->size = fileSize;
|
||||
|
||||
// delete the new entry we created
|
||||
delete entry;
|
||||
}
|
||||
|
||||
delete entry;
|
||||
#else
|
||||
return;
|
||||
#endif
|
||||
@@ -299,9 +299,7 @@ void FileManifest::addStoredManifestEntry(const char *fileName, const char * sce
|
||||
|
||||
std::pair<ManifestMap::iterator, bool> insertReturn = s_manifest.insert(std::pair<const uint32, FileManifestEntry*>(crc, entry));
|
||||
|
||||
// if the insert failed, delete the entry we created
|
||||
if (!insertReturn.second)
|
||||
delete entry;
|
||||
delete entry;
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user