summaryrefslogtreecommitdiffstats
path: root/src/corelib/json
diff options
context:
space:
mode:
authorGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2017-02-27 15:15:19 +0000
committerGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2017-04-19 06:19:27 +0000
commit2d504c67093ac52f22cbe9eede996c16b20612fe (patch)
tree84f0d901e5a486aa80781ad3d95cca8360b93cd2 /src/corelib/json
parent8a375341cf7a7cf38ef427bc0c9f1abde05a471d (diff)
QJsonValue: implement copy-assignment via copy-and-swap
Now we have a swap() member, remove the comment. Amends bbb440bab261fecc7c9baf779dadf36659d3cf6f. Change-Id: I3640d544bbd0927109460d843252c8e5f0aefaf5 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Diffstat (limited to 'src/corelib/json')
-rw-r--r--src/corelib/json/qjsonvalue.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/corelib/json/qjsonvalue.cpp b/src/corelib/json/qjsonvalue.cpp
index cd7c1c63fc..16f4913e9c 100644
--- a/src/corelib/json/qjsonvalue.cpp
+++ b/src/corelib/json/qjsonvalue.cpp
@@ -276,10 +276,7 @@ QJsonValue::QJsonValue(const QJsonValue &other)
QJsonValue &QJsonValue::operator =(const QJsonValue &other)
{
QJsonValue copy(other);
- // swap(copy);
- qSwap(dbl, copy.dbl);
- qSwap(d, copy.d);
- qSwap(t, copy.t);
+ swap(copy);
return *this;
}