[Bf-blender-cvs] [0b970bc1601] functions: fix fill constructor of vector

Jacques Lucke noreply at git.blender.org
Thu Aug 1 18:23:25 CEST 2019


Commit: 0b970bc16015d8d564ef2cd3ab1336fde68e6780
Author: Jacques Lucke
Date:   Thu Aug 1 15:36:16 2019 +0200
Branches: functions
https://developer.blender.org/rB0b970bc16015d8d564ef2cd3ab1336fde68e6780

fix fill constructor of vector

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

M	source/blender/blenlib/BLI_vector.hpp

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

diff --git a/source/blender/blenlib/BLI_vector.hpp b/source/blender/blenlib/BLI_vector.hpp
index 8557b91f49f..c53931612f9 100644
--- a/source/blender/blenlib/BLI_vector.hpp
+++ b/source/blender/blenlib/BLI_vector.hpp
@@ -87,7 +87,7 @@ template<typename T, uint N = 4> class Vector {
   Vector(uint size, const T &value) : Vector()
   {
     this->reserve(size);
-    std::fill_n(m_elements, size, value);
+    std::uninitialized_fill_n(m_elements, size, value);
     m_size = size;
   }



More information about the Bf-blender-cvs mailing list