Functions: Add materialize methods for generic mutable virtual array

Similar to how `GVArray_For_VArray` implements `materialize_impl` to
forward the work to its non-generic virtual array, we can do the same
thing for the mutable version, `GVMutableArray_For_VMutableArray`.

This commit should have no visible changes, since as far as I can tell
the only user of this class does not implement special materialize
methods anyway.
This commit is contained in:
Hans Goudey 2021-05-10 19:12:04 -05:00
parent e19ee2e212
commit 5613c61275
Notes: blender-bot 2023-02-14 03:52:45 +01:00
Referenced by commit c5d38a2be8, Functions: Expose set_all method for generic virtual arrays
1 changed files with 10 additions and 0 deletions

View File

@ -554,6 +554,16 @@ template<typename T> class GVMutableArray_For_VMutableArray : public GVMutableAr
varray_->set(index, std::move(value_));
}
void materialize_impl(const IndexMask mask, void *dst) const override
{
varray_->materialize(mask, MutableSpan((T *)dst, mask.min_array_size()));
}
void materialize_to_uninitialized_impl(const IndexMask mask, void *dst) const override
{
varray_->materialize_to_uninitialized(mask, MutableSpan((T *)dst, mask.min_array_size()));
}
const void *try_get_internal_varray_impl() const override
{
return (const VArray<T> *)varray_;