refactor: rename shallow_copy -> shallow_move + streamline
Use RCollector.std_copy_for where appropriate
This commit is contained in:
parent
a129508224
commit
8bb460f402
165 changed files with 279 additions and 352 deletions
|
|
@ -88,12 +88,16 @@ namespace xo {
|
|||
}
|
||||
|
||||
DUniqueString *
|
||||
DUniqueString::shallow_move(obj<AAllocator> mm) const noexcept
|
||||
DUniqueString::shallow_move(obj<ACollector> gc) noexcept
|
||||
{
|
||||
// well-posed, but not expected to be used.
|
||||
//
|
||||
// Not using gc.std_copy_for() here because compiler doesn't know
|
||||
// actual alloc size of a DUniqueString instance
|
||||
|
||||
assert(false);
|
||||
|
||||
DUniqueString * copy = (DUniqueString *)mm.alloc_copy((std::byte *)this);
|
||||
DUniqueString * copy = (DUniqueString *)gc.alloc_copy((std::byte *)this);
|
||||
|
||||
if (copy) {
|
||||
// Copy assignment not implemented in general
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue