Browse Source

fixed the include for priority_queue and made n non-const in knn_octree

Former-commit-id: 570716c1b881bd744cc33a693171ce8c31270e5f
GavinBarill 7 years ago
parent
commit
42597d6e7f
1 changed files with 2 additions and 1 deletions
  1. 2 1
      include/igl/knn_octree.cpp

+ 2 - 1
include/igl/knn_octree.cpp

@@ -2,6 +2,7 @@
 #include "parallel_for.h"
 
 #include <cmath>
+#include <queue>
 
 namespace igl {
   template <typename DerivedP, typename KType, typename IndexType,
@@ -20,7 +21,7 @@ namespace igl {
     
     typedef Eigen::Matrix<typename DerivedP::Scalar, 1, 3> RowVector3PType;
     
-    const int n = P.rows();
+    int n = P.rows();
     const KType real_k = std::min(n,k);
     
     auto distance_to_width_one_cube = [](RowVector3PType point){