Ver Fonte

bug resize/reserve

Former-commit-id: de264268db620813a3af09dbf563892c2cf772c4
Alec Jacobson há 9 anos atrás
pai
commit
1b63927478
1 ficheiros alterados com 2 adições e 2 exclusões
  1. 2 2
      include/igl/normal_derivative.cpp

+ 2 - 2
include/igl/normal_derivative.cpp

@@ -64,7 +64,7 @@ IGL_INLINE void igl::normal_derivative(
           2);
       DDV *= S;
 
-      IJV.resize(DDV.size());
+      IJV.reserve(DDV.size());
       for(size_t f = 0;f<6*4;f++)
       {
         for(size_t e = 0;e<m;e++)
@@ -95,7 +95,7 @@ IGL_INLINE void igl::normal_derivative(
         slice(C,(VectorXi(12)<<1,1,2,2,2,2,0,0,0,0,1,1).finished(),2);
       DDV *= S;
 
-      IJV.resize(DDV.size());
+      IJV.reserve(DDV.size());
       for(size_t f = 0;f<12;f++)
       {
         for(size_t e = 0;e<m;e++)