Guarded allocator: Override placement new operator
Allows to in-place construct objects which are using guarded allocator.
This commit is contained in:
@@ -239,6 +239,10 @@ void MEM_use_guarded_allocator(void);
|
||||
{ \
|
||||
if (mem) \
|
||||
MEM_freeN(mem); \
|
||||
} \
|
||||
void *operator new(size_t /*count*/, void *ptr) \
|
||||
{ \
|
||||
return ptr; \
|
||||
}
|
||||
|
||||
/* Needed when type includes a namespace, then the namespace should not be
|
||||
|
||||
Reference in New Issue
Block a user