mirror of
https://github.com/zhenyan121/Cubed.git
synced 2026-06-17 16:17:02 +08:00
feat: add DEBUG_MODE and ASSETS_PATH macro
This commit is contained in:
@@ -16,10 +16,7 @@ namespace Assert {
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef NDEBUG
|
||||
#define CUBED_ASSERT(cond) ((void)0)
|
||||
#define CUBED_ASSERT_MSG(cond, message) ((void)0)
|
||||
#else
|
||||
#ifdef DEBUG_MODE
|
||||
#define CUBED_ASSERT(cond) \
|
||||
do { \
|
||||
if (!(cond)) { \
|
||||
@@ -32,4 +29,8 @@ namespace Assert {
|
||||
::Assert::msg(#cond, __FILE__, __LINE__, __func__, message); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#else
|
||||
#define CUBED_ASSERT(cond) ((void)0)
|
||||
#define CUBED_ASSERT_MSG(cond, message) ((void)0)
|
||||
#endif
|
||||
Reference in New Issue
Block a user