summaryrefslogtreecommitdiffstats
path: root/src/corelib/arch/qatomic_mips.h
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2012-08-06 18:03:49 +0200
committerQt by Nokia <qt-info@nokia.com>2012-08-18 18:35:36 +0200
commit2b00f97ab05f144293b26d1e0d8cf4c54d222f92 (patch)
treeef1ff7fa28fdb1449f5e91830adc26c36ef34c6c /src/corelib/arch/qatomic_mips.h
parent624911e48174094c80df7e27b28cc2b2d46f4398 (diff)
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 <marc.mutz@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/arch/qatomic_mips.h')
-rw-r--r--src/corelib/arch/qatomic_mips.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/corelib/arch/qatomic_mips.h b/src/corelib/arch/qatomic_mips.h
index 9565d3749f..e662b9abc2 100644
--- a/src/corelib/arch/qatomic_mips.h
+++ b/src/corelib/arch/qatomic_mips.h
@@ -84,18 +84,18 @@ template <int size> struct QBasicAtomicOps: QGenericAtomicOps<QBasicAtomicOps<si
template <typename T>
static void orderedMemoryFence(const T &) Q_DECL_NOTHROW;
- static inline bool isReferenceCountingNative() Q_DECL_NOTHROW { return true; }
+ static inline Q_DECL_CONSTEXPR bool isReferenceCountingNative() Q_DECL_NOTHROW { return true; }
template <typename T> static bool ref(T &_q_value) Q_DECL_NOTHROW;
template <typename T> static bool deref(T &_q_value) Q_DECL_NOTHROW;
- static inline bool isTestAndSetNative() Q_DECL_NOTHROW { return true; }
- static inline bool isTestAndSetWaitFree() Q_DECL_NOTHROW { return false; }
+ static inline Q_DECL_CONSTEXPR bool isTestAndSetNative() Q_DECL_NOTHROW { return true; }
+ static inline Q_DECL_CONSTEXPR bool isTestAndSetWaitFree() Q_DECL_NOTHROW { return false; }
template <typename T> static bool testAndSetRelaxed(T &_q_value, T expectedValue, T newValue) Q_DECL_NOTHROW;
- static inline bool isFetchAndStoreNative() Q_DECL_NOTHROW { return true; }
+ static inline Q_DECL_CONSTEXPR bool isFetchAndStoreNative() Q_DECL_NOTHROW { return true; }
template <typename T> static T fetchAndStoreRelaxed(T &_q_value, T newValue) Q_DECL_NOTHROW;
- static inline bool isFetchAndAddNative() Q_DECL_NOTHROW { return true; }
+ static inline Q_DECL_CONSTEXPR bool isFetchAndAddNative() Q_DECL_NOTHROW { return true; }
template <typename T> static
T fetchAndAddRelaxed(T &_q_value, typename QAtomicAdditiveType<T>::AdditiveT valueToAdd) Q_DECL_NOTHROW;
};