Modified assertion macros so they evaluate to an empty instruction instead of nothing in non-debug builds.

This commit is contained in:
Patrick 2025-06-23 00:21:24 +02:00
parent 7284d3d15f
commit 94e94f02b6

View File

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