Fixed 'at most one statement is allowed per line' for tl_assert macro

This commit is contained in:
Matthias Koefferlein 2020-04-25 22:59:45 +02:00
parent 73521bc0dc
commit 4c6d61bed1
1 changed files with 3 additions and 1 deletions

View File

@ -38,7 +38,9 @@ namespace tl
TL_PUBLIC NO_RETURN void assertion_failed (const char *filename, unsigned int line, const char *condition);
// the throw int(0) instruction will tell the compiler that the assertion will not return
#define tl_assert(COND) if (!(COND)) { tl::assertion_failed (__FILE__, __LINE__, #COND); }
#define tl_assert(COND) if (!(COND)) { \
tl::assertion_failed (__FILE__, __LINE__, #COND); \
}
} // namespace tl