diff options
Diffstat (limited to 'src/corelib/serialization')
-rw-r--r-- | src/corelib/serialization/qcborvalue.h | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/corelib/serialization/qcborvalue.h b/src/corelib/serialization/qcborvalue.h index 42dc307ef8..fd9f78a88d 100644 --- a/src/corelib/serialization/qcborvalue.h +++ b/src/corelib/serialization/qcborvalue.h @@ -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) |