diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2012-08-03 21:13:22 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-08-09 03:26:22 +0200 |
commit | 2d9c2c0562aa895b46a7c01902660aa51981e989 (patch) | |
tree | 0186632a696ea3b571a7629b0933ee6d78c860bb /src/corelib/thread/qatomic.h | |
parent | 7fc34bff7882b63121c045ab5bb81c0d2d37e4ee (diff) |
Add Q_DECL_NOTHROW to the atomic functions
These functions are inline (on most architectures) but they contain
inline assembly which the compiler could not understand. In any case,
if it decides not to inline them, it would need to generate exception
handlers.
Change-Id: If9d50793d715c51781e76d0a539da03a6d83e255
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Diffstat (limited to 'src/corelib/thread/qatomic.h')
-rw-r--r-- | src/corelib/thread/qatomic.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/corelib/thread/qatomic.h b/src/corelib/thread/qatomic.h index 962f566bd1..2eb0a03cc6 100644 --- a/src/corelib/thread/qatomic.h +++ b/src/corelib/thread/qatomic.h @@ -61,17 +61,17 @@ class QAtomicInt : public QBasicAtomicInt { public: // Non-atomic API - inline QAtomicInt(int value = 0) + inline QAtomicInt(int value = 0) Q_DECL_NOTHROW { _q_value = value; } - inline QAtomicInt(const QAtomicInt &other) + inline QAtomicInt(const QAtomicInt &other) Q_DECL_NOTHROW { store(other.load()); } - inline QAtomicInt &operator=(const QAtomicInt &other) + inline QAtomicInt &operator=(const QAtomicInt &other) Q_DECL_NOTHROW { this->store(other.load()); return *this; @@ -115,16 +115,16 @@ template <typename T> class QAtomicPointer : public QBasicAtomicPointer<T> { public: - inline QAtomicPointer(T *value = 0) + inline QAtomicPointer(T *value = 0) Q_DECL_NOTHROW { this->store(value); } - inline QAtomicPointer(const QAtomicPointer<T> &other) + inline QAtomicPointer(const QAtomicPointer<T> &other) Q_DECL_NOTHROW { this->store(other.load()); } - inline QAtomicPointer<T> &operator=(const QAtomicPointer<T> &other) + inline QAtomicPointer<T> &operator=(const QAtomicPointer<T> &other) Q_DECL_NOTHROW { this->store(other.load()); return *this; |