From 78dd962f68cd00d2efc4b682a70ed1885915a979 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Sat, 27 Jun 2015 13:37:12 +0200 Subject: QSharedPointer: mark as nothrow {default,move,copy}{constructible,assignable} Change-Id: Ieae2c5ff6db1a475269034f0bd9cbd903dd3c72a Reviewed-by: Thiago Macieira --- src/corelib/tools/qsharedpointer_impl.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/corelib/tools/qsharedpointer_impl.h') 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); -- cgit v1.2.3