Mercurial > mm7
diff Allocator.cpp @ 1545:c4ab816fcc5e
assert, Abortf, AbortWithError -> Assert, Error
refactors here and there
author | Nomad |
---|---|
date | Sat, 07 Sep 2013 20:05:20 +0200 |
parents | 0aeac0b9ca30 |
children |
line wrap: on
line diff
--- a/Allocator.cpp Sat Sep 07 15:20:57 2013 +0200 +++ b/Allocator.cpp Sat Sep 07 20:05:20 2013 +0200 @@ -6,6 +6,7 @@ #include <stdio.h> #include "Allocator.h" +#include "ErrorHandling.h" #include "mm7_data.h" @@ -13,6 +14,7 @@ Allocator *pAllocator; // idb +int aborting_app = false; // weak @@ -24,9 +26,8 @@ //----- (00426755) -------------------------------------------------------- void *Allocator::AllocNamedChunk(const void *pPrevPtrValue, unsigned int uSize, const char *pName) { + Assert(!pPrevPtrValue, "PrevPtrValue != 0"); - if ( pPrevPtrValue && !aborting_app ) - AbortWithError(); if (!uSize) return 0; return malloc(uSize);