Эх сурвалжийг харах

fix func_wrap argument type

Former-commit-id: c0340bec3d4887837f11884fff77003c9a4fb0af
unclejimbo 6 жил өмнө
parent
commit
3ef2e16408
1 өөрчлөгдсөн 2 нэмэгдсэн , 1 устгасан
  1. 2 1
      include/igl/redux.h

+ 2 - 1
include/igl/redux.h

@@ -44,13 +44,14 @@ inline void igl::redux(
   const Func & func,
   Eigen::PlainObjectBase<DerivedB> & B)
 {
+  typedef typename Eigen::SparseMatrix<AType>::StorageIndex Index;
   assert((dim == 1 || dim == 2) && "dim must be 2 or 1");
   // Get size of input
   int m = A.rows();
   int n = A.cols();
   // resize output
   B = DerivedB::Zero(dim==1?n:m);
-  const auto func_wrap = [&func,&B,&dim](const int i, const int j, const int v)
+  const auto func_wrap = [&func,&B,&dim](const Index i, const Index j, const AType v)
   {
     if(dim == 1)
     {