From 8f283fdb39897310c2303d466cb34bf3d85030ed Mon Sep 17 00:00:00 2001 From: Dario Manesku Date: Mon, 19 Jan 2015 23:12:04 +0100 Subject: [PATCH] If BX_ALIGNED_DELETE calls bx::aligned*(), BX_ALIGNED_NEW should as well. --- include/bx/allocator.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/bx/allocator.h b/include/bx/allocator.h index d9f740b..206ac55 100644 --- a/include/bx/allocator.h +++ b/include/bx/allocator.h @@ -25,7 +25,7 @@ # define BX_ALIGNED_FREE(_allocator, _ptr, _align) bx::free(_allocator, _ptr, _align, __FILE__, __LINE__) # define BX_NEW(_allocator, _type) ::new(BX_ALLOC(_allocator, sizeof(_type) ) ) _type # define BX_DELETE(_allocator, _ptr) bx::deleteObject(_allocator, _ptr, __FILE__, __LINE__) -# define BX_ALIGNED_NEW(_allocator, _type, _align) ::new(BX_ALIGNED_ALLOC(_allocator, sizeof(_type), _align) ) _type +# define BX_ALIGNED_NEW(_allocator, _type, _align) ::new(bx::alignedAlloc(_allocator, sizeof(_type), _align) ) _type # define BX_ALIGNED_DELETE(_allocator, _ptr, _align) bx::alignedDeleteObject(_allocator, _ptr, _align, __FILE__, __LINE__) #else # define BX_ALLOC(_allocator, _size) bx::alloc(_allocator, _size, 0) @@ -36,7 +36,7 @@ # define BX_ALIGNED_FREE(_allocator, _ptr, _align) bx::free(_allocator, _ptr, _align) # define BX_NEW(_allocator, _type) ::new(BX_ALLOC(_allocator, sizeof(_type) ) ) _type # define BX_DELETE(_allocator, _ptr) bx::deleteObject(_allocator, _ptr) -# define BX_ALIGNED_NEW(_allocator, _type, _align) ::new(BX_ALIGNED_ALLOC(_allocator, sizeof(_type), _align) ) _type +# define BX_ALIGNED_NEW(_allocator, _type, _align) ::new(bx::alignedAlloc(_allocator, sizeof(_type), _align) ) _type # define BX_ALIGNED_DELETE(_allocator, _ptr, _align) bx::alignedDeleteObject(_allocator, _ptr, _align) #endif // BX_CONFIG_DEBUG_ALLOC