diff options
author | firewave <firewave@users.noreply.github.com> | 2021-10-30 14:56:24 +0300 |
---|---|---|
committer | firewave <firewave@users.noreply.github.com> | 2021-10-30 14:57:50 +0300 |
commit | c27699a9d6d5c6e89696e45fa9c51efa7fc7d116 (patch) | |
tree | 0f345b934ed381b939e8aeb2f2ecc8af702a6b11 | |
parent | a9773976845b19e89020c1215781e71116477ef1 (diff) |
fixed Clang -Wextra-stmt warnings with TIXMLASSERT
-rwxr-xr-x | tinyxml2.h | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -83,16 +83,16 @@ distribution. #if defined(TINYXML2_DEBUG)
# if defined(_MSC_VER)
# // "(void)0," is for suppressing C4127 warning in "assert(false)", "assert(true)" and the like
-# define TIXMLASSERT( x ) if ( !((void)0,(x))) { __debugbreak(); }
+# define TIXMLASSERT( x ) do { if ( !((void)0,(x))) { __debugbreak(); } } while(false)
# elif defined (ANDROID_NDK)
# include <android/log.h>
-# define TIXMLASSERT( x ) if ( !(x)) { __android_log_assert( "assert", "grinliz", "ASSERT in '%s' at %d.", __FILE__, __LINE__ ); }
+# define TIXMLASSERT( x ) do { if ( !(x)) { __android_log_assert( "assert", "grinliz", "ASSERT in '%s' at %d.", __FILE__, __LINE__ ); } } while(false)
# else
# include <assert.h>
# define TIXMLASSERT assert
# endif
#else
-# define TIXMLASSERT( x ) {}
+# define TIXMLASSERT( x ) do {} while(false)
#endif
#endif
|