util/AllocatedArray: add WritableBuffer/ConstBuffer cast operators

This commit is contained in:
Max Kellermann 2019-12-09 09:47:37 +01:00 committed by Max Kellermann
parent a93b7172aa
commit bd4df1ae5d

View File

@ -106,6 +106,14 @@ public:
return *this;
}
operator ConstBuffer<T>() const noexcept {
return buffer;
}
operator WritableBuffer<T>() noexcept {
return buffer;
}
constexpr bool IsNull() const noexcept {
return buffer.IsNull();
}