mirror of
https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator
synced 2025-01-16 12:04:12 +00:00
Use NDEBUG instead of _DEBUG macro to detect debug build
Closes #92 thanks @daemyung !
This commit is contained in:
parent
e9bfb539d8
commit
7f708dbd44
@ -3584,20 +3584,20 @@ void *aligned_alloc(size_t alignment, size_t size)
|
||||
|
||||
// Normal assert to check for programmer's errors, especially in Debug configuration.
|
||||
#ifndef VMA_ASSERT
|
||||
#ifdef _DEBUG
|
||||
#define VMA_ASSERT(expr) assert(expr)
|
||||
#else
|
||||
#ifdef NDEBUG
|
||||
#define VMA_ASSERT(expr)
|
||||
#else
|
||||
#define VMA_ASSERT(expr) assert(expr)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Assert that will be called very often, like inside data structures e.g. operator[].
|
||||
// Making it non-empty can make program slow.
|
||||
#ifndef VMA_HEAVY_ASSERT
|
||||
#ifdef _DEBUG
|
||||
#define VMA_HEAVY_ASSERT(expr) //VMA_ASSERT(expr)
|
||||
#else
|
||||
#ifdef NDEBUG
|
||||
#define VMA_HEAVY_ASSERT(expr)
|
||||
#else
|
||||
#define VMA_HEAVY_ASSERT(expr) //VMA_ASSERT(expr)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user