diff options
author | Jacques Lucke <mail@jlucke.com> | 2019-09-14 13:37:58 +0300 |
---|---|---|
committer | Jacques Lucke <mail@jlucke.com> | 2019-09-14 13:37:58 +0300 |
commit | e73030e336257b4261dd6b3b66f71b204a8044b7 (patch) | |
tree | 799b9d34997edd108d0a575a55f383c695acbd85 /source/blender/blenlib | |
parent | 79e1165bd7488850e896112c2b0f8bf1e6b25db9 (diff) |
BLI: rename SetVector to VectorSet
The structure is a set built on top of a vector and not the other
way around.
Diffstat (limited to 'source/blender/blenlib')
-rw-r--r-- | source/blender/blenlib/BLI_vector_set.h (renamed from source/blender/blenlib/BLI_set_vector.h) | 22 | ||||
-rw-r--r-- | source/blender/blenlib/CMakeLists.txt | 2 |
2 files changed, 12 insertions, 12 deletions
diff --git a/source/blender/blenlib/BLI_set_vector.h b/source/blender/blenlib/BLI_vector_set.h index 3d5a31e1cce..820c7c63c6a 100644 --- a/source/blender/blenlib/BLI_set_vector.h +++ b/source/blender/blenlib/BLI_vector_set.h @@ -14,15 +14,15 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#ifndef __BLI_SET_VECTOR_H__ -#define __BLI_SET_VECTOR_H__ +#ifndef __BLI_VECTOR_SET_H__ +#define __BLI_VECTOR_SET_H__ /** \file * \ingroup bli * - * A SetVector is a combination of a set and a vector. The elements are stored in a continuous - * array, but every element exists at most once. The insertion order is maintained, as long as - * there are no deletes. The expected time to check if a value is in the SetVector is O(1). + * A VectorSet is a set built on top of a vector. The elements are stored in a continuous array, + * but every element exists at most once. The insertion order is maintained, as long as there are + * no deletes. The expected time to check if a value is in the VectorSet is O(1). */ #include "BLI_hash_cxx.h" @@ -49,7 +49,7 @@ namespace BLI { // clang-format on -template<typename T, typename Allocator = GuardedAllocator> class SetVector { +template<typename T, typename Allocator = GuardedAllocator> class VectorSet { private: static constexpr int32_t IS_EMPTY = -1; static constexpr int32_t IS_DUMMY = -2; @@ -115,19 +115,19 @@ template<typename T, typename Allocator = GuardedAllocator> class SetVector { Vector<T, 4, Allocator> m_elements; public: - SetVector() = default; + VectorSet() = default; - SetVector(ArrayRef<T> values) + VectorSet(ArrayRef<T> values) { this->add_multiple(values); } - SetVector(const std::initializer_list<T> &values) + VectorSet(const std::initializer_list<T> &values) { this->add_multiple(values); } - SetVector(const Vector<T> &values) + VectorSet(const Vector<T> &values) { this->add_multiple(values); } @@ -394,4 +394,4 @@ template<typename T, typename Allocator = GuardedAllocator> class SetVector { } // namespace BLI -#endif /* __BLI_SET_VECTOR_H__ */ +#endif /* __BLI_VECTOR_SET_H__ */ diff --git a/source/blender/blenlib/CMakeLists.txt b/source/blender/blenlib/CMakeLists.txt index a5950051f90..f3740b5d39f 100644 --- a/source/blender/blenlib/CMakeLists.txt +++ b/source/blender/blenlib/CMakeLists.txt @@ -221,7 +221,6 @@ set(SRC BLI_rect.h BLI_scanfill.h BLI_set.h - BLI_set_vector.h BLI_smallhash.h BLI_sort.h BLI_sort_utils.h @@ -248,6 +247,7 @@ set(SRC BLI_utildefines_variadic.h BLI_uvproject.h BLI_vector.h + BLI_vector_set.h BLI_vfontdata.h BLI_voronoi_2d.h BLI_voxel.h |