mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-09-11 21:58:31 +09:00
[Improvement] (All): Better assertion.
This commit is contained in:
+11
-1
@@ -41,4 +41,14 @@
|
||||
#define MOBILEGL_LOG_FILE_PATH "/sdcard/MG/latest.log"
|
||||
#else
|
||||
#define MOBILEGL_LOG_FILE_PATH ""
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// =============================== Utils ================================ //
|
||||
#define MOBILEGL_ASSERT(condition, ...) \
|
||||
do { \
|
||||
if (!(condition)) { \
|
||||
MGLOG_F("Assertion failed" __VA_OPT__(": ") __VA_ARGS__); \
|
||||
MGLOG_F(" at %s:%d (%s)", __FILE__, __LINE__, __func__); \
|
||||
assert(false); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
Reference in New Issue
Block a user