QJsonValue: implement copy-assignment via copy-and-swap

Now we have a swap() member, remove the comment.
Amends bbb440bab2.

Change-Id: I3640d544bbd0927109460d843252c8e5f0aefaf5
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
bb10
Giuseppe D'Angelo 2017-02-27 15:15:19 +00:00
parent 8a375341cf
commit 2d504c6709
1 changed files with 1 additions and 4 deletions

View File

@ -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;
}