From 10229aedf426f1d3357d1da25cc17b033918b583 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C4=99drzej=20Nowacki?= Date: Thu, 26 Jan 2012 12:20:06 +0100 Subject: Fix compilation warnings on MSVC. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Q_STATIC_ASSERT as condition should accept anything cast-able to "bool". Change-Id: Id76992080f9bb84d3a16b80adffc656d52eca91d Reviewed-by: João Abecasis Reviewed-by: Jonas Gastal --- src/corelib/global/qglobal.h | 4 ++-- 1 file 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 class QStaticAssertFailure; -- cgit v1.2.3