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>2020-09-03 17:13:34 +0300
committerJacques Lucke <jacques@blender.org>2020-09-03 17:26:45 +0300
commit519b2f937f3281031d8970cbfc0d26c3acf308a5 (patch)
tree29aa140c283f07c5c2665dfe0652c41ae53addd4
parente7d3d0219b39ef5e8ff0308ef7dc6463770daca2 (diff)
BLI: add index_range method for StringRef
-rw-r--r--source/blender/blenlib/BLI_string_ref.hh5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/blenlib/BLI_string_ref.hh b/source/blender/blenlib/BLI_string_ref.hh
index e30eccca891..be18848fbf4 100644
--- a/source/blender/blenlib/BLI_string_ref.hh
+++ b/source/blender/blenlib/BLI_string_ref.hh
@@ -122,6 +122,11 @@ class StringRefBase {
return data_ + size_;
}
+ IndexRange index_range() const
+ {
+ return IndexRange(size_);
+ }
+
/**
* Copy the string into a buffer. The buffer has to be one byte larger than the size of the
* string, because the copied string will be null-terminated. Only use this when you are