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_set.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_set.hh')
-rw-r--r-- | source/blender/blenlib/BLI_set.hh | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/blenlib/BLI_set.hh b/source/blender/blenlib/BLI_set.hh index 5bdf99360cb..ece9fb05d8c 100644 --- a/source/blender/blenlib/BLI_set.hh +++ b/source/blender/blenlib/BLI_set.hh @@ -276,7 +276,7 @@ class Set { * We might be able to make this faster than sequentially adding all keys, but that is not * implemented yet. */ - void add_multiple(ArrayRef<Key> keys) + void add_multiple(Span<Key> keys) { for (const Key &key : keys) { this->add(key); @@ -287,7 +287,7 @@ class Set { * Convenience function to add many new keys to the set at once. The keys must not exist in the * set before and there must not be duplicates in the array. */ - void add_multiple_new(ArrayRef<Key> keys) + void add_multiple_new(Span<Key> keys) { for (const Key &key : keys) { this->add_new(key); @@ -726,7 +726,7 @@ template<typename Key> class StdUnorderedSetWrapper { return m_set.insert(std::move(key)).second; } - void add_multiple(ArrayRef<Key> keys) + void add_multiple(Span<Key> keys) { for (const Key &key : keys) { m_set.insert(key); |