diff options
author | Jacques Lucke <jacques@blender.org> | 2020-04-23 12:57:58 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2020-04-23 13:02:06 +0300 |
commit | 614621747ea214efc72a095fbef6695bf98a2bb4 (patch) | |
tree | e8a54ae3373f7e965ecc3d0bf74a44db0a9b077a /source/blender/blenlib/BLI_vector.hh | |
parent | 68cfce1519ed63dc0a231c7de81c26f3f9c810f1 (diff) |
BLI: optimize VectorSet implementation
Instead of building on top of `BLI::Vector`, just use a raw array
and handle the growing in `BLI::VectorSet`.
After this change, the existing `EdgeSet` can be reimplemented using
`BLI::VectorSet` without performance regressions.
Diffstat (limited to 'source/blender/blenlib/BLI_vector.hh')
-rw-r--r-- | source/blender/blenlib/BLI_vector.hh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/blenlib/BLI_vector.hh b/source/blender/blenlib/BLI_vector.hh index a44962e50cc..450242a349a 100644 --- a/source/blender/blenlib/BLI_vector.hh +++ b/source/blender/blenlib/BLI_vector.hh @@ -49,7 +49,7 @@ template<typename T, uint N = 4, typename Allocator = GuardedAllocator> class Ve T *m_end; T *m_capacity_end; Allocator m_allocator; - AlignedBuffer<sizeof(T) * N, alignof(T)> m_small_buffer; + AlignedBuffer<(uint)sizeof(T) * N, (uint)alignof(T)> m_small_buffer; #ifndef NDEBUG /* Storing size in debug builds, because it makes debugging much easier sometimes. */ |