mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-25 21:40:33 +05:00
Fix ArrayMem::operator=(ArrayMem&&) (again)
This commit is contained in:
parent
1653f56efc
commit
da85de4795
@ -1115,11 +1115,15 @@ namespace ngcore
|
||||
ngcore::Swap (mem_to_delete, a2.mem_to_delete);
|
||||
ngcore::Swap (allocsize, a2.allocsize);
|
||||
ngcore::Swap (size, a2.size);
|
||||
ngcore::Swap (data, a2.data);
|
||||
|
||||
if (mem_to_delete==nullptr)
|
||||
{
|
||||
for (auto i : Range(size))
|
||||
mem[i] = std::move(a2.mem[i]);
|
||||
data = mem;
|
||||
}
|
||||
else
|
||||
ngcore::Swap (data, a2.data);
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user