[Bf-blender-cvs] [63342861e7c] master: Fix: error in previous commit
Jacques Lucke
noreply at git.blender.org
Fri Nov 26 13:29:40 CET 2021
Commit: 63342861e7c113010808b918c68ad4de87d496f3
Author: Jacques Lucke
Date: Fri Nov 26 13:29:24 2021 +0100
Branches: master
https://developer.blender.org/rB63342861e7c113010808b918c68ad4de87d496f3
Fix: error in previous commit
Forgot to actually slice the span in rB6b5e1cfacab4c4605ec2d7bfef360389afe849be.
===================================================================
M source/blender/functions/intern/generic_virtual_array.cc
===================================================================
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
More information about the Bf-blender-cvs
mailing list