diff options
author | Jędrzej Nowacki <jedrzej.nowacki@nokia.com> | 2012-01-26 12:20:06 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-01-29 15:21:50 +0100 |
commit | 10229aedf426f1d3357d1da25cc17b033918b583 (patch) | |
tree | 8cd0df641234cbf6ba32605a46b7222dfb3dd97e | |
parent | d874c059d36fe125c577dde9e980407fbd43beac (diff) |
Fix compilation warnings on MSVC.
Q_STATIC_ASSERT as condition should accept anything cast-able to "bool".
Change-Id: Id76992080f9bb84d3a16b80adffc656d52eca91d
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Jonas Gastal <jgastal@profusion.mobi>
-rw-r--r-- | src/corelib/global/qglobal.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h index b38583c771..832dd10953 100644 --- a/src/corelib/global/qglobal.h +++ b/src/corelib/global/qglobal.h @@ -1737,8 +1737,8 @@ Q_CORE_EXPORT void qt_assert_x(const char *where, const char *what, const char * #ifdef Q_COMPILER_STATIC_ASSERT -#define Q_STATIC_ASSERT(Condition) static_assert(Condition, #Condition) -#define Q_STATIC_ASSERT_X(Condition, Message) static_assert(Condition, Message) +#define Q_STATIC_ASSERT(Condition) static_assert(bool(Condition), #Condition) +#define Q_STATIC_ASSERT_X(Condition, Message) static_assert(bool(Condition), Message) #else // Intentionally undefined template <bool Test> class QStaticAssertFailure; |