diff options
author | Jacques Lucke <jacques@blender.org> | 2021-11-26 15:29:24 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2021-11-26 15:29:24 +0300 |
commit | 63342861e7c113010808b918c68ad4de87d496f3 (patch) | |
tree | 57eb6d4024290e8b2e4d6d6d83655c048cb82be8 /source/blender/functions/intern | |
parent | b066d5821607091bb86e0fcb2dbbd3e1067ca4d2 (diff) |
Fix: error in previous commit
Forgot to actually slice the span in rB6b5e1cfacab4c4605ec2d7bfef360389afe849be.
Diffstat (limited to 'source/blender/functions/intern')
-rw-r--r-- | source/blender/functions/intern/generic_virtual_array.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/functions/intern/generic_virtual_array.cc b/source/blender/functions/intern/generic_virtual_array.cc index 625aa2cd50f..b8f44c15c2f 100644 --- a/source/blender/functions/intern/generic_virtual_array.cc +++ b/source/blender/functions/intern/generic_virtual_array.cc @@ -477,12 +477,14 @@ class GVArrayImpl_For_SlicedGVArray : public GVArrayImpl { protected: GVArray varray_; int64_t offset_; + IndexRange slice_; public: GVArrayImpl_For_SlicedGVArray(GVArray varray, const IndexRange slice) : GVArrayImpl(varray.type(), slice.size()), varray_(std::move(varray)), - offset_(slice.start()) + offset_(slice.start()), + slice_(slice) { BLI_assert(slice.one_after_last() <= varray_.size()); } @@ -503,7 +505,7 @@ class GVArrayImpl_For_SlicedGVArray : public GVArrayImpl { } GSpan get_internal_span() const override { - return varray_.get_internal_span(); + return varray_.get_internal_span().slice(slice_); } bool is_single() const override |