summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qsharedpointer_impl.h
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2015-06-27 13:37:12 +0200
committerMarc Mutz <marc.mutz@kdab.com>2015-09-13 12:22:36 +0000
commit78dd962f68cd00d2efc4b682a70ed1885915a979 (patch)
treeba6e8fd580d7a9af7929a6dcea60c3b304090ce1 /src/corelib/tools/qsharedpointer_impl.h
parent98ce9a6309932c7cf3ec12c18b5fa1493cc4f420 (diff)
QSharedPointer: mark as nothrow {default,move,copy}{constructible,assignable}
Change-Id: Ieae2c5ff6db1a475269034f0bd9cbd903dd3c72a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/tools/qsharedpointer_impl.h')
-rw-r--r--src/corelib/tools/qsharedpointer_impl.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/corelib/tools/qsharedpointer_impl.h b/src/corelib/tools/qsharedpointer_impl.h
index e224b26d9f..c14999996c 100644
--- a/src/corelib/tools/qsharedpointer_impl.h
+++ b/src/corelib/tools/qsharedpointer_impl.h
@@ -306,7 +306,7 @@ public:
inline T &operator*() const { return *data(); }
inline T *operator->() const { return data(); }
- QSharedPointer() : value(Q_NULLPTR), d(Q_NULLPTR) { }
+ QSharedPointer() Q_DECL_NOTHROW : value(Q_NULLPTR), d(Q_NULLPTR) {}
~QSharedPointer() { deref(); }
inline explicit QSharedPointer(T *ptr) : value(ptr) // noexcept
@@ -316,22 +316,22 @@ public:
inline QSharedPointer(T *ptr, Deleter deleter) : value(ptr) // throws
{ internalConstruct(ptr, deleter); }
- inline QSharedPointer(const QSharedPointer &other) : value(other.value), d(other.d)
+ QSharedPointer(const QSharedPointer &other) Q_DECL_NOTHROW : value(other.value), d(other.d)
{ if (d) ref(); }
- inline QSharedPointer &operator=(const QSharedPointer &other)
+ QSharedPointer &operator=(const QSharedPointer &other) Q_DECL_NOTHROW
{
QSharedPointer copy(other);
swap(copy);
return *this;
}
#ifdef Q_COMPILER_RVALUE_REFS
- inline QSharedPointer(QSharedPointer &&other)
+ QSharedPointer(QSharedPointer &&other) Q_DECL_NOTHROW
: value(other.value), d(other.d)
{
other.d = Q_NULLPTR;
other.value = Q_NULLPTR;
}
- inline QSharedPointer &operator=(QSharedPointer &&other)
+ QSharedPointer &operator=(QSharedPointer &&other) Q_DECL_NOTHROW
{
QSharedPointer moved(std::move(other));
swap(moved);