mirror of
https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator.git
synced 2025-06-02 18:07:48 +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
1 changed files with 6 additions and 6 deletions
|
@ -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.
|
// Normal assert to check for programmer's errors, especially in Debug configuration.
|
||||||
#ifndef VMA_ASSERT
|
#ifndef VMA_ASSERT
|
||||||
#ifdef _DEBUG
|
#ifdef NDEBUG
|
||||||
#define VMA_ASSERT(expr) assert(expr)
|
|
||||||
#else
|
|
||||||
#define VMA_ASSERT(expr)
|
#define VMA_ASSERT(expr)
|
||||||
|
#else
|
||||||
|
#define VMA_ASSERT(expr) assert(expr)
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Assert that will be called very often, like inside data structures e.g. operator[].
|
// Assert that will be called very often, like inside data structures e.g. operator[].
|
||||||
// Making it non-empty can make program slow.
|
// Making it non-empty can make program slow.
|
||||||
#ifndef VMA_HEAVY_ASSERT
|
#ifndef VMA_HEAVY_ASSERT
|
||||||
#ifdef _DEBUG
|
#ifdef NDEBUG
|
||||||
#define VMA_HEAVY_ASSERT(expr) //VMA_ASSERT(expr)
|
|
||||||
#else
|
|
||||||
#define VMA_HEAVY_ASSERT(expr)
|
#define VMA_HEAVY_ASSERT(expr)
|
||||||
|
#else
|
||||||
|
#define VMA_HEAVY_ASSERT(expr) //VMA_ASSERT(expr)
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue