[Bf-blender-cvs] [717577d5fc6] master: BLI: Fix VectorSet copy constructor

Jacques Lucke noreply at git.blender.org
Wed May 20 15:47:45 CEST 2020


Commit: 717577d5fc6019764c301f11db6f235b567c4b9f
Author: Jacques Lucke
Date:   Wed May 20 15:47:32 2020 +0200
Branches: master
https://developer.blender.org/rB717577d5fc6019764c301f11db6f235b567c4b9f

BLI: Fix VectorSet copy constructor

Thanks to Howard for pointing that out.

===================================================================

M	source/blender/blenlib/BLI_vector_set.hh

===================================================================

diff --git a/source/blender/blenlib/BLI_vector_set.hh b/source/blender/blenlib/BLI_vector_set.hh
index 9f887513816..f402f47c357 100644
--- a/source/blender/blenlib/BLI_vector_set.hh
+++ b/source/blender/blenlib/BLI_vector_set.hh
@@ -140,7 +140,7 @@ template<typename T, typename Allocator = GuardedAllocator> class VectorSet {
   VectorSet(const VectorSet &other) : m_array(other.m_array)
   {
     m_elements = this->allocate_elements_array(m_array.slots_usable());
-    copy_n(other.m_elements, m_array.slots_set(), m_elements);
+    uninitialized_copy_n(other.m_elements, m_array.slots_set(), m_elements);
   }
 
   VectorSet(VectorSet &&other) : m_array(std::move(other.m_array)), m_elements(other.m_elements)



More information about the Bf-blender-cvs mailing list