QCborValue: streamline some code with qExchange
Change-Id: I79b68173a236ff1f28504a11ff182bdf48b2df0b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>bb10
parent
3e08154582
commit
f8076d6a5b
|
|
@ -179,10 +179,8 @@ public:
|
|||
|
||||
QCborValue(const QCborValue &other);
|
||||
QCborValue(QCborValue &&other) noexcept
|
||||
: n(other.n), container(other.container), t(other.t)
|
||||
: n(other.n), container(qExchange(other.container, nullptr)), t(qExchange(other.t, Undefined))
|
||||
{
|
||||
other.t = Undefined;
|
||||
other.container = nullptr;
|
||||
}
|
||||
QCborValue &operator=(const QCborValue &other);
|
||||
QT_MOVE_ASSIGNMENT_OPERATOR_IMPL_VIA_MOVE_AND_SWAP(QCborValue)
|
||||
|
|
|
|||
Loading…
Reference in New Issue