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>
This commit is contained in:
Jędrzej Nowacki 2012-01-26 12:20:06 +01:00 committed by Qt by Nokia
parent d874c059d3
commit 10229aedf4

View File

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