diff options
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenlib/BLI_span.hh | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/blenlib/BLI_span.hh b/source/blender/blenlib/BLI_span.hh index 5b7981e0302..995dc70a84d 100644 --- a/source/blender/blenlib/BLI_span.hh +++ b/source/blender/blenlib/BLI_span.hh @@ -599,6 +599,11 @@ template<typename T> class MutableSpan { return MutableSpan(data_ + start, new_size); } + constexpr MutableSpan slice(IndexRange range) const + { + return this->slice(range.start(), range.size()); + } + /** * Returns a new MutableSpan with n elements removed from the beginning. This invokes * undefined behavior when n is negative. |