From f679a44f51e0571f9e7eaa0e600b20da9e48721c Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Sun, 19 Jul 2015 23:00:43 +0200 Subject: [PATCH] QRegExp: mark existing move assignment operator and swap() nothrow Change-Id: Iad9adc1cb9ea72689c81624caae2fe5a9e02e591 Reviewed-by: Thiago Macieira --- src/corelib/tools/qregexp.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/corelib/tools/qregexp.h b/src/corelib/tools/qregexp.h index f384e6c51f..9c68c194e0 100644 --- a/src/corelib/tools/qregexp.h +++ b/src/corelib/tools/qregexp.h @@ -68,10 +68,9 @@ public: ~QRegExp(); QRegExp &operator=(const QRegExp &rx); #ifdef Q_COMPILER_RVALUE_REFS - inline QRegExp &operator=(QRegExp &&other) - { qSwap(priv,other.priv); return *this; } + QRegExp &operator=(QRegExp &&other) Q_DECL_NOTHROW { swap(other); return *this; } #endif - inline void swap(QRegExp &other) { qSwap(priv, other.priv); } + void swap(QRegExp &other) Q_DECL_NOTHROW { qSwap(priv, other.priv); } bool operator==(const QRegExp &rx) const; inline bool operator!=(const QRegExp &rx) const { return !operator==(rx); }