Modified assertion macros so they evaluate to an empty instruction instead of nothing in non-debug builds.
This commit is contained in:
parent
7284d3d15f
commit
94e94f02b6
@ -45,7 +45,7 @@ namespace mijin
|
|||||||
|
|
||||||
#if MIJIN_DEBUG
|
#if MIJIN_DEBUG
|
||||||
|
|
||||||
#define MIJIN_RAISE_ERROR(msg, source_loc) \
|
#define MIJIN_RAISE_ERROR(msg, source_loc) \
|
||||||
switch (mijin::handleError(msg, source_loc)) \
|
switch (mijin::handleError(msg, source_loc)) \
|
||||||
{ \
|
{ \
|
||||||
case mijin::ErrorHandling::CONTINUE: \
|
case mijin::ErrorHandling::CONTINUE: \
|
||||||
@ -99,10 +99,10 @@ if (!static_cast<bool>(condition)) \
|
|||||||
MIJIN_FATAL("Debug assertion failed: " #condition "\nMessage: " msg); \
|
MIJIN_FATAL("Debug assertion failed: " #condition "\nMessage: " msg); \
|
||||||
}
|
}
|
||||||
#else // MIJIN_DEBUG
|
#else // MIJIN_DEBUG
|
||||||
#define MIJIN_ERROR(...)
|
#define MIJIN_ERROR(...) ((void)0)
|
||||||
#define MIJIN_FATAL(...) std::abort()
|
#define MIJIN_FATAL(...) std::abort()
|
||||||
#define MIJIN_ASSERT(...)
|
#define MIJIN_ASSERT(...) ((void)0)
|
||||||
#define MIJIN_ASSERT_FATAL(...)
|
#define MIJIN_ASSERT_FATAL(...) ((void)0)
|
||||||
#endif // !MIJIN_DEBUG
|
#endif // !MIJIN_DEBUG
|
||||||
|
|
||||||
//
|
//
|
||||||
|
Loading…
x
Reference in New Issue
Block a user