Pārlūkot izejas kodu

Explicitly zero-fill incidence vector.

Chris Johnson 6 gadi atpakaļ
vecāks
revīzija
a6e97d4df6
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  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.
   // 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++)
   for(int e = 0;e<WE.rows();e++)
   {
   {
     ++nedges[WE(e, 0)];
     ++nedges[WE(e, 0)];