Use NDEBUG instead of _DEBUG macro to detect debug build

Closes #92 thanks @daemyung !
This commit is contained in:
Adam Sawicki 2019-12-18 10:54:28 +01:00
parent e9bfb539d8
commit 7f708dbd44

View File

@ -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