From 2b00f97ab05f144293b26d1e0d8cf4c54d222f92 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Mon, 6 Aug 2012 18:03:49 +0200 Subject: Add Q_DECL_CONSTEXPR to the isXXX functions in the new atomics. This allows one to write code that depends on these values at compile-time. Change-Id: I7d78524ed9c70d4141360496d1d764dcbfa92e62 Reviewed-by: Marc Mutz Reviewed-by: Thiago Macieira --- src/corelib/arch/qatomic_armv5.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/corelib/arch/qatomic_armv5.h') diff --git a/src/corelib/arch/qatomic_armv5.h b/src/corelib/arch/qatomic_armv5.h index c43b4de6da..5ccc1c39ff 100644 --- a/src/corelib/arch/qatomic_armv5.h +++ b/src/corelib/arch/qatomic_armv5.h @@ -101,8 +101,8 @@ template struct QBasicAtomicOps: QGenericAtomicOps static bool ref(T &_q_value) Q_DECL_NOTHROW; template static bool deref(T &_q_value) Q_DECL_NOTHROW; - static bool isTestAndSetNative() Q_DECL_NOTHROW { return false; } - static bool isTestAndSetWaitFree() Q_DECL_NOTHROW { return false; } + static Q_DECL_CONSTEXPR bool isTestAndSetNative() Q_DECL_NOTHROW { return false; } + static Q_DECL_CONSTEXPR bool isTestAndSetWaitFree() Q_DECL_NOTHROW { return false; } template static bool testAndSetRelaxed(T &_q_value, T expectedValue, T newValue) Q_DECL_NOTHROW; template static T fetchAndStoreRelaxed(T &_q_value, T newValue) Q_DECL_NOTHROW; template static -- cgit v1.2.3