From f815676b7d46cfe6e79985dee9fce182edb346d7 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Thu, 25 Jun 2015 18:41:14 +0200 Subject: QtCore: make all Q_DECLARE_SHARED types nothrow move-assignable Excepting QDebug, which doesn't have value semantics. Change-Id: I43757ef7bba4c1f5b6de9144f12b38ce840cd9f9 Reviewed-by: Olivier Goffart (Woboq GmbH) --- src/corelib/tools/qvector.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/corelib/tools/qvector.h') diff --git a/src/corelib/tools/qvector.h b/src/corelib/tools/qvector.h index d13ae9dccd..821fc9b68a 100644 --- a/src/corelib/tools/qvector.h +++ b/src/corelib/tools/qvector.h @@ -69,11 +69,10 @@ public: inline ~QVector() { if (!d->ref.deref()) freeData(d); } QVector &operator=(const QVector &v); #ifdef Q_COMPILER_RVALUE_REFS - inline QVector(QVector &&other) : d(other.d) { other.d = Data::sharedNull(); } - inline QVector operator=(QVector &&other) - { qSwap(d, other.d); return *this; } + QVector(QVector &&other) Q_DECL_NOTHROW : d(other.d) { other.d = Data::sharedNull(); } + QVector operator=(QVector &&other) Q_DECL_NOTHROW { swap(other); return *this; } #endif - inline void swap(QVector &other) { qSwap(d, other.d); } + void swap(QVector &other) Q_DECL_NOTHROW { qSwap(d, other.d); } #ifdef Q_COMPILER_INITIALIZER_LISTS inline QVector(std::initializer_list args); #endif -- cgit v1.2.3