From 92464faea924b46c8ef2759b88a166dd3cf2e9d3 Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Thu, 15 Dec 2011 12:39:40 +0100 Subject: [PATCH] Q_STATIC_ASSERT: fix C style cast MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Else tst_moc::oldStyleCasts will fail if one add STATIC_ASSERT in some headers included by moc generated files Change-Id: I29ae64c14f10c889137fde36bb14c8ce047d5244 Reviewed-by: Jędrzej Nowacki --- src/corelib/global/qglobal.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h index 76b956c..581bac9 100644 --- a/src/corelib/global/qglobal.h +++ b/src/corelib/global/qglobal.h @@ -1733,7 +1733,7 @@ template <> class QStaticAssertFailure {}; #define Q_STATIC_ASSERT_PRIVATE_JOIN(A, B) Q_STATIC_ASSERT_PRIVATE_JOIN_IMPL(A, B) #define Q_STATIC_ASSERT_PRIVATE_JOIN_IMPL(A, B) A ## B #define Q_STATIC_ASSERT(Condition) \ - enum {Q_STATIC_ASSERT_PRIVATE_JOIN(q_static_assert_result, __LINE__) = sizeof(QStaticAssertFailure<(bool)(Condition)>)} + enum {Q_STATIC_ASSERT_PRIVATE_JOIN(q_static_assert_result, __LINE__) = sizeof(QStaticAssertFailure<(Condition)>)} #define Q_STATIC_ASSERT_X(Condition, Message) Q_STATIC_ASSERT(Condition) #endif -- 2.7.4