From aba30f02348c60ea785c374d12e1f3998dc4cb14 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Mon, 2 Dec 2013 19:50:29 -0800 Subject: Replace the type-based QAtomicIntegerTraits with a size-based one This simplifies the code a lot and avoids silly mistakes where a specific integer type is missing (such as char16_t). Change-Id: Id91dfd1919e783e0a9af7bfa093ca560a01b22d1 Reviewed-by: Lars Knoll --- src/corelib/thread/qbasicatomic.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/corelib/thread/qbasicatomic.h') diff --git a/src/corelib/thread/qbasicatomic.h b/src/corelib/thread/qbasicatomic.h index 9fa12ba8118..f75a24ae10b 100644 --- a/src/corelib/thread/qbasicatomic.h +++ b/src/corelib/thread/qbasicatomic.h @@ -114,7 +114,8 @@ class QBasicAtomicInteger public: typedef QAtomicOps Ops; // static check that this is a valid integer - Q_STATIC_ASSERT_X(QAtomicIntegerTraits::IsInteger, "Template parameter is not a supported integer on this platform"); + Q_STATIC_ASSERT_X(QTypeInfo::isIntegral, "template parameter is not an integral type"); + Q_STATIC_ASSERT_X(QAtomicOpsSupport::IsSupported, "template parameter is an integral of a size not supported on this platform"); typename Ops::Type _q_value; -- cgit v1.2.3