Daniele Bartolini 9 years ago
parent
commit
342cc5330f
1 changed files with 13 additions and 2 deletions
  1. 13 2
      src/core/error/error.h

+ 13 - 2
src/core/error/error.h

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