浏览代码

cleanup warnings

Former-commit-id: fe208d520aaa1b1758babc74eab7bc6041df7488
Alec Jacobson 9 年之前
父节点
当前提交
2282d71554
共有 4 个文件被更改,包括 9 次插入7 次删除
  1. 2 2
      include/igl/AABB.h
  2. 3 2
      include/igl/doublearea.cpp
  3. 1 1
      include/igl/exterior_edges.cpp
  4. 3 2
      include/igl/internal_angles.cpp

+ 2 - 2
include/igl/AABB.h

@@ -190,7 +190,7 @@ public:
           const RowVectorDIMS & p,
           int & i,
           RowVectorDIMS & c) const;
-private:
+//private:
       inline Scalar squared_distance(
           const Eigen::PlainObjectBase<DerivedV> & V,
           const Eigen::MatrixXi & Ele, 
@@ -369,7 +369,7 @@ inline void igl::AABB<DerivedV,DIM>::init(
   using namespace Eigen;
   using namespace std;
   assert(DIM == V.cols() && "V.cols() should matched declared dimension");
-  const Scalar inf = numeric_limits<Scalar>::infinity();
+  //const Scalar inf = numeric_limits<Scalar>::infinity();
   m_box = AlignedBox<Scalar,DIM>();
   // Compute bounding box
   for(int i = 0;i<I.rows();i++)

+ 3 - 2
include/igl/doublearea.cpp

@@ -116,10 +116,11 @@ IGL_INLINE void igl::doublearea(
 {
   using namespace Eigen;
   using namespace std;
+  typedef typename Derivedl::Index Index;
   // Only support triangles
   assert(ul.cols() == 3);
   // Number of triangles
-  const size_t m = ul.rows();
+  const Index m = ul.rows();
   Eigen::PlainObjectBase<Derivedl> l;
   MatrixXi _;
   sort(ul,2,false,l,_);
@@ -133,7 +134,7 @@ IGL_INLINE void igl::doublearea(
   #  define IGL_OMP_MIN_VALUE 1000
   #endif
   #pragma omp parallel for if (m>IGL_OMP_MIN_VALUE)
-  for(long long i = 0;i<m;i++)
+  for(Index i = 0;i<m;i++)
   {
     //// Heron's formula for area
     //const typename Derivedl::Scalar arg =

+ 1 - 1
include/igl/exterior_edges.cpp

@@ -86,7 +86,7 @@ IGL_INLINE void igl::exterior_edges(
       }
       // Append edge for every repeated entry
       const int abs_count = abs(count);
-      for(size_t k = 0;k<abs_count;k++)
+      for(int k = 0;k<abs_count;k++)
       {
         E(e,0) = i;
         E(e,1) = j;

+ 3 - 2
include/igl/internal_angles.cpp

@@ -64,8 +64,9 @@ IGL_INLINE void igl::internal_angles(
   const Eigen::PlainObjectBase<DerivedL>& L,
   Eigen::PlainObjectBase<DerivedK> & K)
 {
+  typedef typename DerivedL::Index Index;
   assert(L.cols() == 3 && "Edge-lengths should come from triangles");
-  const size_t m = L.rows();
+  const Index m = L.rows();
   K.resize(m,3);
   //for(int d = 0;d<3;d++)
   //{
@@ -79,7 +80,7 @@ IGL_INLINE void igl::internal_angles(
   #  define IGL_OMP_MIN_VALUE 1000
   #endif
   #pragma omp parallel for if (m>IGL_OMP_MIN_VALUE)
-  for(long long f = 0;f<m;f++)
+  for(Index f = 0;f<m;f++)
   {
     for(size_t d = 0;d<3;d++)
     {