[Bf-blender-cvs] [1a79bdfbf12] master: BLI: inline index mask slice methods

Jacques Lucke noreply at git.blender.org
Sat Jan 14 19:40:30 CET 2023


Commit: 1a79bdfbf120f5fe258a295732fb7ac21df9392d
Author: Jacques Lucke
Date:   Sat Jan 14 19:40:22 2023 +0100
Branches: master
https://developer.blender.org/rB1a79bdfbf120f5fe258a295732fb7ac21df9392d

BLI: inline index mask slice methods

Those are simple enough to be inlined.

===================================================================

M	source/blender/blenlib/BLI_index_mask.hh
M	source/blender/blenlib/intern/index_mask.cc

===================================================================

diff --git a/source/blender/blenlib/BLI_index_mask.hh b/source/blender/blenlib/BLI_index_mask.hh
index 2144955f4f5..c37820d648b 100644
--- a/source/blender/blenlib/BLI_index_mask.hh
+++ b/source/blender/blenlib/BLI_index_mask.hh
@@ -234,8 +234,15 @@ class IndexMask {
     return indices_.first() >= range.first() && indices_.last() <= range.last();
   }
 
-  IndexMask slice(int64_t start, int64_t size) const;
-  IndexMask slice(IndexRange slice) const;
+  IndexMask slice(const int64_t start, const int64_t size) const
+  {
+    return IndexMask(indices_.slice(start, size));
+  }
+
+  IndexMask slice(const IndexRange slice) const
+  {
+    return IndexMask(indices_.slice(slice));
+  }
 
   IndexMask slice_safe(int64_t start, int64_t size) const;
   IndexMask slice_safe(IndexRange slice) const;
diff --git a/source/blender/blenlib/intern/index_mask.cc b/source/blender/blenlib/intern/index_mask.cc
index 72282bc69f3..adcc2de8bdb 100644
--- a/source/blender/blenlib/intern/index_mask.cc
+++ b/source/blender/blenlib/intern/index_mask.cc
@@ -5,16 +5,6 @@
 
 namespace blender {
 
-IndexMask IndexMask::slice(int64_t start, int64_t size) const
-{
-  return this->slice(IndexRange(start, size));
-}
-
-IndexMask IndexMask::slice(IndexRange slice) const
-{
-  return IndexMask(indices_.slice(slice));
-}
-
 IndexMask IndexMask::slice_safe(int64_t start, int64_t size) const
 {
   return this->slice_safe(IndexRange(start, size));



More information about the Bf-blender-cvs mailing list