Explorar o código

Explicitly zero-fill incidence vector.

Chris Johnson %!s(int64=6) %!d(string=hai) anos
pai
achega
a6e97d4df6
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      include/igl/copyleft/cgal/wire_mesh.cpp

+ 1 - 1
include/igl/copyleft/cgal/wire_mesh.cpp

@@ -64,7 +64,7 @@ IGL_INLINE void igl::copyleft::cgal::wire_mesh(
   };
 
   // Count each vertex's indicident edges.
-  std::vector<int> nedges(WV.rows());
+  std::vector<int> nedges(WV.rows(), 0);
   for(int e = 0;e<WE.rows();e++)
   {
     ++nedges[WE(e, 0)];