diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2018-07-08 19:28:09 -0700 |
---|---|---|
committer | Thiago Macieira <thiago.macieira@intel.com> | 2018-07-14 04:20:38 +0000 |
commit | 1016c0af740ebdf4b7dccfe5db5d63f07e4fee00 (patch) | |
tree | 84d28a511ad47f7011bbfc16bf9185b244f1166c /src/corelib/serialization/qcborarray.cpp | |
parent | 503646a3317c1041fb5ded803a3935ef330ea036 (diff) |
CBOR: Use "noexcept" directly
All supported compilers support it.
Doing this just for the new API. We should do it throughout Qt, but only
if it won't interfere with the header review.
Change-Id: Id59bdd8f1a804b809e22fffd153f9254688e5152
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
Diffstat (limited to 'src/corelib/serialization/qcborarray.cpp')
-rw-r--r-- | src/corelib/serialization/qcborarray.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/corelib/serialization/qcborarray.cpp b/src/corelib/serialization/qcborarray.cpp index e35738adcc..8dabf8c75d 100644 --- a/src/corelib/serialization/qcborarray.cpp +++ b/src/corelib/serialization/qcborarray.cpp @@ -113,7 +113,7 @@ using namespace QtCbor; /*! Constructs an empty QCborArray. */ -QCborArray::QCborArray() Q_DECL_NOTHROW +QCborArray::QCborArray() noexcept : d(nullptr) { } @@ -121,7 +121,7 @@ QCborArray::QCborArray() Q_DECL_NOTHROW /*! Copies the contents of \a other into this object. */ -QCborArray::QCborArray(const QCborArray &other) Q_DECL_NOTHROW +QCborArray::QCborArray(const QCborArray &other) noexcept : d(other.d) { } @@ -148,7 +148,7 @@ QCborArray::~QCborArray() Replaces the contents of this array with that found in \a other, then returns a reference to this object. */ -QCborArray &QCborArray::operator=(const QCborArray &other) Q_DECL_NOTHROW +QCborArray &QCborArray::operator=(const QCborArray &other) noexcept { d = other.d; return *this; @@ -180,7 +180,7 @@ QCborArray &QCborArray::operator=(const QCborArray &other) Q_DECL_NOTHROW \sa isEmpty() */ -qsizetype QCborArray::size() const Q_DECL_NOTHROW +qsizetype QCborArray::size() const noexcept { return d ? d->elements.size() : 0; } |