util/AllocatedArray: add operator=(nullptr)

This commit is contained in:
Max Kellermann 2021-01-14 16:12:07 +01:00 committed by Max Kellermann
parent 0ded23591b
commit c44a7b2705

View File

@ -110,6 +110,12 @@ public:
return *this;
}
AllocatedArray &operator=(std::nullptr_t n) noexcept {
delete[] buffer.data;
buffer = n;
return *this;
}
operator ConstBuffer<T>() const noexcept {
return buffer;
}