diff --git a/src/util/HugeAllocator.hxx b/src/util/HugeAllocator.hxx index 75f75761e..7f75a7ce1 100644 --- a/src/util/HugeAllocator.hxx +++ b/src/util/HugeAllocator.hxx @@ -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)