diff --git a/src/dsc.h b/src/dsc.h index 51d6f54..4accb1f 100644 --- a/src/dsc.h +++ b/src/dsc.h @@ -514,9 +514,9 @@ public: void MoveSelfInto(IdList *l) { l->Clear(); - *l = *this; - elemsAllocated = n = 0; - elem = NULL; + std::swap(l->elem, elem); + std::swap(l->elemsAllocated, elemsAllocated); + std::swap(l->n, n); } void DeepCopyInto(IdList *l) {