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
parent
8a375341cf
commit
2d504c6709
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue