|
|
@@ -27,8 +27,19 @@ namespace error
|
|
|
} // namespace crown
|
|
|
|
|
|
#if CROWN_DEBUG
|
|
|
- #define CE_ASSERT(condition, msg, ...) do { if (!(condition)) {\
|
|
|
- crown::error::abort(__FILE__, __LINE__, "\nAssertion failed: %s\n\t" msg "\n", #condition, ##__VA_ARGS__); }} while (0)
|
|
|
+ #define CE_ASSERT(condition, msg, ...) \
|
|
|
+ do \
|
|
|
+ { \
|
|
|
+ if (!(condition)) \
|
|
|
+ { \
|
|
|
+ crown::error::abort(__FILE__ \
|
|
|
+ , __LINE__ \
|
|
|
+ , "\nAssertion failed: %s\n\t" msg "\n" \
|
|
|
+ , #condition \
|
|
|
+ , ##__VA_ARGS__ \
|
|
|
+ ); \
|
|
|
+ } \
|
|
|
+ } while (0)
|
|
|
#else
|
|
|
#define CE_ASSERT(...) ((void)0)
|
|
|
#endif // CROWN_DEBUG
|