refactor: rename shallow_copy -> shallow_move + streamline
Use RCollector.std_copy_for where appropriate
This commit is contained in:
parent
0cb20c3789
commit
8ac5ba9bbb
28 changed files with 45 additions and 62 deletions
|
|
@ -181,9 +181,12 @@ namespace xo {
|
|||
}
|
||||
|
||||
DArray *
|
||||
DArray::shallow_move(obj<AAllocator> mm) const noexcept
|
||||
DArray::shallow_move(obj<ACollector> gc) noexcept
|
||||
{
|
||||
DArray * copy = (DArray *)mm.alloc_copy((std::byte *)this);
|
||||
// note: not using gc.std_copy_for() here.
|
||||
// flexible array -> compiler doesn't know actual DArray allocation size
|
||||
|
||||
DArray * copy = (DArray *)gc.alloc_copy((std::byte *)this);
|
||||
|
||||
if (copy) {
|
||||
copy->capacity_ = capacity_;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue