diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2015-01-19 21:10:49 +0100 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2015-01-21 11:22:50 +0100 |
commit | b9365aed6a6699e4ae1c1638217565a18ebf6de6 (patch) | |
tree | 93713cfec0ab4e0bf7807661ba10aa30c50b59f4 /src/corelib/tools/qstring.h | |
parent | 9fab24f8779fbfc1ab03483d41f41070b3fe9c32 (diff) |
QtCore: add some more Q_DECL_NOTHROW
QtCore now builds with no -Wnoexcept warnings
(that doesn't mean there aren't tons of functions
that should be marked noexcept, just that all
conditionally noexcept functions aren't noexcept(false)
just because of a forgotten noexcept elsewhere).
Change-Id: I10dacb6b9c9d41d3595fe2f306356d62d3d91c76
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/tools/qstring.h')
-rw-r--r-- | src/corelib/tools/qstring.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/corelib/tools/qstring.h b/src/corelib/tools/qstring.h index 71d10f0663..d20d08bc0c 100644 --- a/src/corelib/tools/qstring.h +++ b/src/corelib/tools/qstring.h @@ -215,10 +215,10 @@ public: QString(QChar c); QString(int size, QChar c); inline QString(QLatin1String latin1); - inline QString(const QString &); + inline QString(const QString &) Q_DECL_NOTHROW; inline ~QString(); QString &operator=(QChar c); - QString &operator=(const QString &); + QString &operator=(const QString &) Q_DECL_NOTHROW; inline QString &operator=(QLatin1String latin1); #ifdef Q_COMPILER_RVALUE_REFS inline QString(QString && other) Q_DECL_NOTHROW : d(other.d) { other.d = Data::sharedNull(); } @@ -865,7 +865,7 @@ inline QString &QString::operator=(QLatin1String s) } inline void QString::clear() { if (!isNull()) *this = QString(); } -inline QString::QString(const QString &other) : d(other.d) +inline QString::QString(const QString &other) Q_DECL_NOTHROW : d(other.d) { Q_ASSERT(&other != this); d->ref.ref(); } inline int QString::capacity() const { return d->alloc ? d->alloc - 1 : 0; } |