mirror of https://github.com/KLayout/klayout.git
Fixed 'at most one statement is allowed per line' for tl_assert macro
This commit is contained in:
parent
73521bc0dc
commit
4c6d61bed1
|
|
@ -38,7 +38,9 @@ namespace tl
|
||||||
TL_PUBLIC NO_RETURN void assertion_failed (const char *filename, unsigned int line, const char *condition);
|
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
|
// 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
|
} // namespace tl
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue