Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Goudey <h.goudey@me.com>2021-05-11 03:12:04 +0300
committerHans Goudey <h.goudey@me.com>2021-05-11 03:12:04 +0300
commit5613c61275fe67b4d6113f79512bd129d372509c (patch)
tree26e25039a51094c42a2b831f5d9f71bcaad09d11 /source/blender/functions/FN_generic_virtual_array.hh
parente19ee2e212ab1befbbe717ce85bd66b17614e347 (diff)
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.
Diffstat (limited to 'source/blender/functions/FN_generic_virtual_array.hh')
-rw-r--r--source/blender/functions/FN_generic_virtual_array.hh10
1 files changed, 10 insertions, 0 deletions
diff --git a/source/blender/functions/FN_generic_virtual_array.hh b/source/blender/functions/FN_generic_virtual_array.hh
index aca752583c4..12454fe08f3 100644
--- a/source/blender/functions/FN_generic_virtual_array.hh
+++ b/source/blender/functions/FN_generic_virtual_array.hh
@@ -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_;