fix msvc 2008 warning about downcasting to bool
the compiler doesn't have static_assert yet, so we ran into the path which was not fixed by10229ae
. use !!() pattern instead of bool() cast, as the latter throws off macx (see95d7abb
). the other alternative - a c-style cast - would cause autotest failures (see92464fa
), and would be ugly anyway. Change-Id: Idbe9a3b60e17ae1f566f938d9b9be04f0c977492 Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
This commit is contained in:
parent
6dc85408cd
commit
dd84eab9d8
@ -1031,7 +1031,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<(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