Make use of the VALIDATE macro safe.

This commit is contained in:
Mark de Wever 2011-01-08 20:40:20 +00:00
parent 051270d101
commit 96d9e2e129

View file

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