summaryrefslogtreecommitdiffstats
path: root/src/corelib/serialization/qcbormap.cpp
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2018-07-08 19:28:09 -0700
committerThiago Macieira <thiago.macieira@intel.com>2018-07-14 04:20:38 +0000
commit1016c0af740ebdf4b7dccfe5db5d63f07e4fee00 (patch)
tree84d28a511ad47f7011bbfc16bf9185b244f1166c /src/corelib/serialization/qcbormap.cpp
parent503646a3317c1041fb5ded803a3935ef330ea036 (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/qcbormap.cpp')
-rw-r--r--src/corelib/serialization/qcbormap.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/corelib/serialization/qcbormap.cpp b/src/corelib/serialization/qcbormap.cpp
index 6b6a56c389..f6760050bb 100644
--- a/src/corelib/serialization/qcbormap.cpp
+++ b/src/corelib/serialization/qcbormap.cpp
@@ -199,7 +199,7 @@ using namespace QtCbor;
\sa isEmpty()
*/
-QCborMap::QCborMap() Q_DECL_NOTHROW
+QCborMap::QCborMap() noexcept
: d(nullptr)
{
}
@@ -207,7 +207,7 @@ QCborMap::QCborMap() Q_DECL_NOTHROW
/*!
Creates a QCborMap object that is a copy of \a other.
*/
-QCborMap::QCborMap(const QCborMap &other) Q_DECL_NOTHROW
+QCborMap::QCborMap(const QCborMap &other) noexcept
: d(other.d)
{
}
@@ -239,7 +239,7 @@ QCborMap::~QCborMap()
Replaces the contents of this object with a copy of \a other, then returns
a reference to this object.
*/
-QCborMap &QCborMap::operator=(const QCborMap &other) Q_DECL_NOTHROW
+QCborMap &QCborMap::operator=(const QCborMap &other) noexcept
{
d = other.d;
return *this;
@@ -278,7 +278,7 @@ QCborMap &QCborMap::operator=(const QCborMap &other) Q_DECL_NOTHROW
\sa isEmpty()
*/
-qsizetype QCborMap::size() const Q_DECL_NOTHROW
+qsizetype QCborMap::size() const noexcept
{
return d ? d->elements.size() / 2 : 0;
}