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/arch/qatomic_x86.h | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) (limited to 'src/corelib/arch/qatomic_x86.h') diff --git a/src/corelib/arch/qatomic_x86.h b/src/corelib/arch/qatomic_x86.h index 6ed283396d..2013d8f991 100644 --- a/src/corelib/arch/qatomic_x86.h +++ b/src/corelib/arch/qatomic_x86.h @@ -117,18 +117,9 @@ template struct QAtomicOps : QBasicAtomicOps #if defined(Q_CC_GNU) -template<> struct QAtomicIntegerTraits { enum { IsInteger = 1 }; }; -template<> struct QAtomicIntegerTraits { enum { IsInteger = 1 }; }; -template<> struct QAtomicIntegerTraits { enum { IsInteger = 1 }; }; -template<> struct QAtomicIntegerTraits { enum { IsInteger = 1 }; }; -template<> struct QAtomicIntegerTraits { enum { IsInteger = 1 }; }; -template<> struct QAtomicIntegerTraits { enum { IsInteger = 1 }; }; -template<> struct QAtomicIntegerTraits { enum { IsInteger = 1 }; }; - -# ifdef Q_COMPILER_UNICODE_STRINGS -template<> struct QAtomicIntegerTraits { enum { IsInteger = 1 }; }; -# endif - +template<> struct QAtomicOpsSupport<1> { enum { IsSupported = 1 }; }; +template<> struct QAtomicOpsSupport<2> { enum { IsSupported = 1 }; }; +template<> struct QAtomicOpsSupport<8> { enum { IsSupported = 1 }; }; /* * Guide for the inline assembly below: -- cgit v1.2.3