diff options
author | Jacques Lucke <jacques@blender.org> | 2020-09-03 17:13:34 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2020-09-03 17:26:45 +0300 |
commit | 519b2f937f3281031d8970cbfc0d26c3acf308a5 (patch) | |
tree | 29aa140c283f07c5c2665dfe0652c41ae53addd4 /source/blender | |
parent | e7d3d0219b39ef5e8ff0308ef7dc6463770daca2 (diff) |
BLI: add index_range method for StringRef
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenlib/BLI_string_ref.hh | 5 |
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 |