From 63342861e7c113010808b918c68ad4de87d496f3 Mon Sep 17 00:00:00 2001 From: Jacques Lucke Date: Fri, 26 Nov 2021 13:29:24 +0100 Subject: Fix: error in previous commit Forgot to actually slice the span in rB6b5e1cfacab4c4605ec2d7bfef360389afe849be. --- source/blender/functions/intern/generic_virtual_array.cc | 6 ++++-- 1 file 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 -- cgit v1.2.3