diff --git a/src/object2/DList.cpp b/src/object2/DList.cpp index 0be056d..35cb722 100644 --- a/src/object2/DList.cpp +++ b/src/object2/DList.cpp @@ -33,7 +33,7 @@ namespace xo { obj car, DList * cdr) { - void * mem = mm.alloc(typeseq::id(), sizeof(DList)); + void * mem = mm.alloc_for(); return new (mem) DList(car, cdr); } @@ -159,12 +159,7 @@ namespace xo { DList * DList::shallow_copy(obj mm) const noexcept { - DList * copy = (DList *)mm.alloc_copy((std::byte *)this); - - if (copy) - *copy = *this; - - return copy; + return mm.std_copy_for(this); } auto