Skip to content

Commit b7ebce3

Browse files
committed
Assert: Add NAZARA_ENABLE_ASSERTS to enable NazaraAssert even if NDEBUG is defined
1 parent 5dbbd12 commit b7ebce3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

include/NazaraUtils/Assert.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#include <NazaraUtils/Prerequisites.hpp>
1111
#include <NazaraUtils/ConstantEvaluated.hpp>
1212

13-
#if !defined(NAZARA_NO_ASSERT) && !defined(NDEBUG)
13+
#if !defined(NAZARA_NO_ASSERT) && (defined(NAZARA_ENABLE_ASSERTS) || !defined(NDEBUG))
1414
#define NazaraAssert(cond) if NAZARA_UNLIKELY(!(cond)) Nz::AssertFailureWithSource(__FILE__, __LINE__, #cond)
1515
#define NazaraAssertMsg(cond, ...) if NAZARA_UNLIKELY(!(cond)) Nz::AssertFailureWithSource(__FILE__, __LINE__, __VA_ARGS__)
1616
#else

0 commit comments

Comments
 (0)