From 390b16aea85e64bc33ce91e37898f59ad8a994c7 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Thu, 8 Jan 2015 15:08:22 +0100 Subject: QtCore: mark some operations nothrow This shotgun-surgery approach is motivated by trying to get a clean(er) build for -Wnoexcept on GCC, so it is expected that for any class touched here, there will be more operations that can be marked nothrow. But they don't show up in conditional noexcept clauses, yet, so they are deferred to some later commit. Change-Id: I0eb10d75a26c361fb22cf785399e83b434bdf233 Reviewed-by: Thiago Macieira --- src/corelib/tools/qcollator.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/corelib/tools/qcollator.h') diff --git a/src/corelib/tools/qcollator.h b/src/corelib/tools/qcollator.h index f9ae44cf6b..98f06bcc1f 100644 --- a/src/corelib/tools/qcollator.h +++ b/src/corelib/tools/qcollator.h @@ -52,10 +52,10 @@ public: ~QCollatorSortKey(); QCollatorSortKey &operator=(const QCollatorSortKey &other); #ifdef Q_COMPILER_RVALUE_REFS - inline QCollatorSortKey &operator=(QCollatorSortKey &&other) + inline QCollatorSortKey &operator=(QCollatorSortKey &&other) Q_DECL_NOTHROW { swap(other); return *this; } #endif - void swap(QCollatorSortKey &other) + void swap(QCollatorSortKey &other) Q_DECL_NOTHROW { d.swap(other.d); } int compare(const QCollatorSortKey &key) const; @@ -82,13 +82,13 @@ public: ~QCollator(); QCollator &operator=(const QCollator &); #ifdef Q_COMPILER_RVALUE_REFS - QCollator(QCollator &&other) + QCollator(QCollator &&other) Q_DECL_NOTHROW : d(other.d) { other.d = 0; } - QCollator &operator=(QCollator &&other) + QCollator &operator=(QCollator &&other) Q_DECL_NOTHROW { swap(other); return *this; } #endif - void swap(QCollator &other) + void swap(QCollator &other) Q_DECL_NOTHROW { qSwap(d, other.d); } void setLocale(const QLocale &locale); -- cgit v1.2.3