Make use of the VALIDATE macro safe.
This commit is contained in:
parent
051270d101
commit
96d9e2e129
1 changed files with 6 additions and 1 deletions
|
@ -44,7 +44,12 @@ class display;
|
|||
#endif
|
||||
#endif
|
||||
|
||||
#define VALIDATE(cond, message) if(!(cond)) wml_exception(#cond, __FILE__, __LINE__, __func__, message)
|
||||
#define VALIDATE(cond, message) \
|
||||
do { \
|
||||
if(!(cond)) { \
|
||||
wml_exception(#cond, __FILE__, __LINE__, __func__, message); \
|
||||
} \
|
||||
} while(0)
|
||||
|
||||
/**
|
||||
* Helper function, don't call this directly.
|
||||
|
|
Loading…
Add table
Reference in a new issue