summaryrefslogtreecommitdiffstats
path: root/src/corelib/serialization/qjsonarray.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/serialization/qjsonarray.cpp')
-rw-r--r--src/corelib/serialization/qjsonarray.cpp23
1 files changed, 7 insertions, 16 deletions
diff --git a/src/corelib/serialization/qjsonarray.cpp b/src/corelib/serialization/qjsonarray.cpp
index 167b6a3a773..33f4d51b5fb 100644
--- a/src/corelib/serialization/qjsonarray.cpp
+++ b/src/corelib/serialization/qjsonarray.cpp
@@ -138,11 +138,13 @@ QJsonArray::QJsonArray(std::initializer_list<QJsonValue> args)
Since QJsonArray is implicitly shared, the copy is shallow
as long as the object doesn't get modified.
*/
-QJsonArray::QJsonArray(const QJsonArray &other)
-{
- a = other.a;
-}
+QJsonArray::QJsonArray(const QJsonArray &other) noexcept = default;
+
+/*!
+ \since 5.10
+ Move-constructs a QJsonArray from \a other.
+*/
QJsonArray::QJsonArray(QJsonArray &&other) noexcept
: a(other.a)
{
@@ -152,18 +154,7 @@ QJsonArray::QJsonArray(QJsonArray &&other) noexcept
/*!
Assigns \a other to this array.
*/
-QJsonArray &QJsonArray::operator =(const QJsonArray &other)
-{
- a = other.a;
- return *this;
-}
-
-/*!
- \fn QJsonArray::QJsonArray(QJsonArray &&other)
- \since 5.10
-
- Move-constructs a QJsonArray from \a other.
-*/
+QJsonArray &QJsonArray::operator =(const QJsonArray &other) noexcept = default;
/*!
\fn QJsonArray &QJsonArray::operator =(QJsonArray &&other)