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:
authorJacques Lucke <jacques@blender.org>2021-11-24 19:49:33 +0300
committerJacques Lucke <jacques@blender.org>2021-11-24 19:49:33 +0300
commit499c24ce7530b484b103fa714e94fc72ef6acfc2 (patch)
treea11ff14a08ada12ffcf2a1b1033ca83a7f30d130 /source/blender/blenlib/intern/index_mask.cc
parentcbe9a87d282f8060670b2162a87995a255dda556 (diff)
BLI: add slice method to index mask and generic span
Diffstat (limited to 'source/blender/blenlib/intern/index_mask.cc')
-rw-r--r--source/blender/blenlib/intern/index_mask.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/blenlib/intern/index_mask.cc b/source/blender/blenlib/intern/index_mask.cc
index cba985b8a44..d726dff6d16 100644
--- a/source/blender/blenlib/intern/index_mask.cc
+++ b/source/blender/blenlib/intern/index_mask.cc
@@ -18,6 +18,11 @@
namespace blender {
+IndexMask IndexMask::slice(IndexRange slice) const
+{
+ return IndexMask(indices_.slice(slice));
+}
+
/**
* Create a sub-mask that is also shifted to the beginning. The shifting to the beginning allows
* code to work with smaller indices, which is more memory efficient.