mirror of
https://bitbucket.org/theswgsource/src-1.2.git
synced 2026-09-29 14:12:54 -04:00
tidies some things up and removes SOE memory manager overriding
This commit is contained in:
@@ -71,7 +71,7 @@ char *SetupSharedXmlNamespace::xmlDuplicateString(char const *source)
|
||||
|
||||
void *SetupSharedXmlNamespace::xmlReAllocate(void *memory, size_t byteCount)
|
||||
{
|
||||
return MemoryManager::reallocate(memory, byteCount);
|
||||
return realloc(memory, byteCount);
|
||||
}
|
||||
|
||||
// ======================================================================
|
||||
|
||||
@@ -116,18 +116,9 @@ XmlTreeDocument const *XmlTreeDocumentList::fetch(CrcString const &filename)
|
||||
delete file;
|
||||
|
||||
//-- Create an XML DOM tree out of it.
|
||||
#ifdef _DEBUG
|
||||
unsigned long const preDomBytesAllocated = MemoryManager::getCurrentNumberOfBytesAllocated();
|
||||
#endif
|
||||
|
||||
xmlDocPtr const xmlDocument = xmlParseMemory(reinterpret_cast<char const *>(fileContents), fileSize);
|
||||
FATAL(!xmlDocument, ("xmlParseMemory() returned nullptr when parsing contents of file [%s].", cPathName));
|
||||
|
||||
#ifdef _DEBUG
|
||||
unsigned long const postDomBytesAllocated = MemoryManager::getCurrentNumberOfBytesAllocated();
|
||||
DEBUG_REPORT_LOG(s_logXmlDomTreeSize, ("XmlTreeDocumentList: XML tree file [%s]: XML DOM tree appears to have consumed [%d] bytes.\n", cPathName, static_cast<int>(postDomBytesAllocated - preDomBytesAllocated)));
|
||||
#endif
|
||||
|
||||
// Release initial file contents buffer.
|
||||
delete [] fileContents;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user