Q_STATIC_ASSERT: fix C style cast
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 <jedrzej.nowacki@nokia.com>
This commit is contained in:
parent
74c9f9d83f
commit
92464faea9
@ -1733,7 +1733,7 @@ template <> class QStaticAssertFailure<true> {};
|
||||
#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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user