Commit 8662427d authored by Max Kellermann's avatar Max Kellermann

util/HugeAllocator: use std::exchange()

parent 821480d3
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment