BLI: inline index mask slice methods

Those are simple enough to be inlined.
This commit is contained in:
Jacques Lucke 2023-01-14 19:40:22 +01:00
parent ff15edc6ab
commit 1a79bdfbf1
2 changed files with 9 additions and 12 deletions

View File

@ -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;

View File

@ -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));