util/HugeAllocator: use std::exchange()
This commit is contained in:
parent
821480d329
commit
8662427d48
@ -125,9 +125,7 @@ public:
|
||||
:data(HugeAllocate(_size)), size(_size) {}
|
||||
|
||||
HugeAllocation(HugeAllocation &&src) noexcept
|
||||
:data(src.data), size(src.size) {
|
||||
src.data = nullptr;
|
||||
}
|
||||
:data(std::exchange(src.data, nullptr)), size(src.size) {}
|
||||
|
||||
~HugeAllocation() {
|
||||
if (data != nullptr)
|
||||
|
Loading…
Reference in New Issue
Block a user