Commit f1ba61c7 authored by Philipp A. Hartmann's avatar Philipp A. Hartmann

unittest.h: change RAPIDJSON_ASSERT to allow usage in expressions

parent 2f45319b
...@@ -117,7 +117,7 @@ public: ...@@ -117,7 +117,7 @@ public:
#pragma GCC diagnostic pop #pragma GCC diagnostic pop
#endif #endif
#define RAPIDJSON_ASSERT(x) if (!(x)) throw AssertException(RAPIDJSON_STRINGIFY(x)) #define RAPIDJSON_ASSERT(x) (!(x) ? throw AssertException(RAPIDJSON_STRINGIFY(x)) : (void)0u)
class Random { class Random {
public: public:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment