Adjust namespace.
parent
3d8029dfc9
commit
1ef151e034
|
|
@ -23,8 +23,8 @@
|
|||
*/
|
||||
|
||||
|
||||
#ifndef NdAllocators_H
|
||||
#define NdAllocators_H
|
||||
#ifndef NDALLOCATORS_H
|
||||
#define NDALLOCATORS_H
|
||||
|
||||
|
||||
#include <new>
|
||||
|
|
@ -32,26 +32,29 @@
|
|||
#include <stdint.h>
|
||||
#include "ndmemorypool.h"
|
||||
|
||||
namespace ndAllocators
|
||||
namespace nd
|
||||
{
|
||||
namespace allocators
|
||||
{
|
||||
#ifdef ND_USE_ND_ALLOCS
|
||||
void *ndMalloc( size_t aSize, size_t aAlign );
|
||||
void ndFree( void* ptr );
|
||||
void *ndRealloc( void *ptr, size_t aSize, size_t aAlign );
|
||||
void *malloc( size_t aSize, size_t aAlign );
|
||||
void free( void* ptr );
|
||||
void *realloc( void *ptr, size_t aSize, size_t aAlign );
|
||||
#else
|
||||
inline void *ndMalloc( size_t aSize, size_t aAlign )
|
||||
{
|
||||
return malloc( aSize );
|
||||
}
|
||||
inline void ndFree( void* ptr )
|
||||
{
|
||||
return free( ptr );
|
||||
}
|
||||
void *ndRealloc( void *ptr, size_t aSize, size_t aAlign )
|
||||
{
|
||||
return realloc( ptr, aSize );
|
||||
}
|
||||
inline void *malloc( size_t aSize, size_t aAlign )
|
||||
{
|
||||
return ::malloc( aSize );
|
||||
}
|
||||
inline void free( void* ptr )
|
||||
{
|
||||
::free( ptr );
|
||||
}
|
||||
void *realloc( void *ptr, size_t aSize, size_t aAlign )
|
||||
{
|
||||
return ::realloc( ptr, aSize );
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
#endif //NdAllocators_H
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Reference in New Issue