From e396532eee8655b24f9af5dad06bde13136182f3 Mon Sep 17 00:00:00 2001 From: jcarreira Date: Sun, 15 Nov 2015 00:26:46 +0000 Subject: [PATCH] Fix some macros in LibMemory --- lib/LibMemory.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/LibMemory.h b/lib/LibMemory.h index 3e685cd..c2b44b3 100644 --- a/lib/LibMemory.h +++ b/lib/LibMemory.h @@ -53,13 +53,12 @@ typedef unsigned long long UInt64; #define DATA_ALIGN 1 ///< use 32-bit aligned malloc/free #if DATA_ALIGN && _WIN32 && ( _MSC_VER > 1300 ) #define xMalloc( len ) _aligned_malloc( len, 32 ) -#define xFree( ptr ) _aligned_free ( ptr ) -#define xMemSet( type, len, ptr ) +#define xFreeMem( ptr ) _aligned_free ( ptr ) #else -#define xMemSet( type, len, ptr ) memset ( ptr, 0, (len)*sizeof(type) ) #define xMalloc( len ) malloc ( len ) -#define xFreeMem( ptr ) free ( ptr ) +#define xFreeMem( ptr ) free ( ptr ) #endif +#define xMemSet( type, len, ptr ) memset ( ptr, 0, (len)*sizeof(type) ) static inline Void* xMallocMem( SizeT nitems ) {