diff options
author | Jacques Lucke <jacques@blender.org> | 2020-06-09 12:58:47 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2020-06-09 12:58:47 +0300 |
commit | f7c0f1b8b83ac475755b633abf59cf9f447b2d49 (patch) | |
tree | 97302f741ce4e40f6e4de9f0cfd54c7320ee7fd5 /source/blender/blenlib/BLI_index_range.hh | |
parent | 7d2b4ae9c6ecce394130cd08694914bf93497a11 (diff) |
BLI: rename ArrayRef to Span
This also renames `MutableArrayRef` to `MutableSpan`.
The name "Span" works better, because `std::span` will provide
similar functionality in C++20. Furthermore, a shorter, more
concise name for a common data structure is nice.
Diffstat (limited to 'source/blender/blenlib/BLI_index_range.hh')
-rw-r--r-- | source/blender/blenlib/BLI_index_range.hh | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/blenlib/BLI_index_range.hh b/source/blender/blenlib/BLI_index_range.hh index 8a97facd9c0..25192429a5d 100644 --- a/source/blender/blenlib/BLI_index_range.hh +++ b/source/blender/blenlib/BLI_index_range.hh @@ -49,7 +49,7 @@ * Ideally this could be could be even closer to Python's enumerate(). We might get that in the * future with newer C++ versions. * - * One other important feature is the as_array_ref method. This method returns an ArrayRef<uint> + * One other important feature is the as_span method. This method returns an Span<uint> * that contains the interval as individual numbers. */ @@ -66,7 +66,7 @@ template<typename Value> class blocked_range; namespace blender { -template<typename T> class ArrayRef; +template<typename T> class Span; class IndexRange { private: @@ -227,7 +227,7 @@ class IndexRange { /** * Get read-only access to a memory buffer that contains the range as actual numbers. */ - ArrayRef<uint> as_array_ref() const; + Span<uint> as_span() const; friend std::ostream &operator<<(std::ostream &stream, IndexRange range) { |