From 2d504c67093ac52f22cbe9eede996c16b20612fe Mon Sep 17 00:00:00 2001 From: Giuseppe D'Angelo Date: Mon, 27 Feb 2017 15:15:19 +0000 Subject: [PATCH] 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 --- src/corelib/json/qjsonvalue.cpp | 5 +---- 1 file changed, 1 insertion(+), 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; }