Переглянути джерело

Fix a bunch of warnings (#2254)

* fix a couple warnings

* fix a bunch of warnings (mostly unused variable)

* fix a bunch of warnings and simplify params

* Special assert so that variables aren't seen as unused

* fix tutorial

* undo erroneous line removal

* ASSERT -> IGL_ASSERT

* VSC ❄️ doesn't realize MAX_DEPTH is conts
Alec Jacobson 2 роки тому
батько
коміт
687530283c
100 змінених файлів з 396 додано та 558 видалено
  1. 3 0
      CMakeLists.txt
  2. 5 0
      cmake/igl/igl_add_library.cmake
  3. 1 12
      include/igl/AABB.cpp
  4. 13 12
      include/igl/AtA_cached.cpp
  5. 67 67
      include/igl/FastWindingNumberForSoups.h
  6. 1 1
      include/igl/FileMemoryStream.h
  7. 9 0
      include/igl/IGL_ASSERT.h
  8. 0 4
      include/igl/MshSaver.cpp
  9. 5 0
      include/igl/Singular_Value_Decomposition_Main_Kernel_Body.hpp
  10. 1 1
      include/igl/WindingNumberAABB.h
  11. 1 1
      include/igl/WindingNumberTree.h
  12. 8 0
      include/igl/active_set.cpp
  13. 5 4
      include/igl/arap_dof.cpp
  14. 0 1
      include/igl/bijective_composite_harmonic_mapping.cpp
  15. 0 1
      include/igl/blkdiag.cpp
  16. 0 2
      include/igl/blue_noise.cpp
  17. 0 1
      include/igl/boundary_conditions.cpp
  18. 1 1
      include/igl/circulation.cpp
  19. 4 0
      include/igl/collapse_small_triangles.cpp
  20. 2 2
      include/igl/compute_frame_field_bisectors.cpp
  21. 2 0
      include/igl/compute_frame_field_bisectors.h
  22. 0 1
      include/igl/connect_boundary_to_infinity.cpp
  23. 1 2
      include/igl/copyleft/cgal/SelfIntersectMesh.h
  24. 1 1
      include/igl/copyleft/cgal/assign_scalar.cpp
  25. 7 12
      include/igl/copyleft/cgal/closest_facet.cpp
  26. 8 19
      include/igl/copyleft/cgal/extract_cells.cpp
  27. 0 3
      include/igl/copyleft/cgal/extract_cells.h
  28. 3 17
      include/igl/copyleft/cgal/extract_cells_single_component.cpp
  29. 1 5
      include/igl/copyleft/cgal/extract_cells_single_component.h
  30. 16 10
      include/igl/copyleft/cgal/extract_feature.cpp
  31. 8 8
      include/igl/copyleft/cgal/extract_feature.h
  32. 0 2
      include/igl/copyleft/cgal/fast_winding_number.cpp
  33. 0 1
      include/igl/copyleft/cgal/half_space_box.cpp
  34. 6 33
      include/igl/copyleft/cgal/intersect_other.cpp
  35. 1 3
      include/igl/copyleft/cgal/mesh_boolean.cpp
  36. 0 3
      include/igl/copyleft/cgal/point_areas.cpp
  37. 0 5
      include/igl/copyleft/cgal/point_mesh_squared_distance.cpp
  38. 0 2
      include/igl/copyleft/cgal/points_inside_component.cpp
  39. 1 2
      include/igl/copyleft/cgal/projected_delaunay.cpp
  40. 15 11
      include/igl/copyleft/cgal/propagate_winding_numbers.cpp
  41. 0 1
      include/igl/copyleft/cgal/relabel_small_immersed_cells.cpp
  42. 1 8
      include/igl/copyleft/cgal/remesh_intersections.cpp
  43. 0 2
      include/igl/copyleft/cgal/segment_segment_squared_distance.cpp
  44. 0 3
      include/igl/copyleft/cgal/subdivide_segments.cpp
  45. 0 1
      include/igl/copyleft/cgal/triangle_triangle_squared_distance.cpp
  46. 0 4
      include/igl/copyleft/cgal/triangulate.cpp
  47. 0 1
      include/igl/copyleft/cgal/trim_with_solid.cpp
  48. 12 12
      include/igl/copyleft/cgal/wire_mesh.cpp
  49. 17 13
      include/igl/copyleft/quadprog.cpp
  50. 1 1
      include/igl/copyleft/tetgen/cdt.h
  51. 2 1
      include/igl/cotmatrix_intrinsic.cpp
  52. 18 40
      include/igl/cr_vector_mass.cpp
  53. 5 24
      include/igl/cr_vector_mass.h
  54. 0 1
      include/igl/cross_field_mismatch.cpp
  55. 1 1
      include/igl/curved_hessian_energy.cpp
  56. 0 1
      include/igl/cut_mesh.cpp
  57. 0 2
      include/igl/cut_mesh_from_singularities.cpp
  58. 5 4
      include/igl/decimate.cpp
  59. 3 0
      include/igl/decimate.h
  60. 0 1
      include/igl/delaunay_triangulation.cpp
  61. 1 1
      include/igl/dual_contouring.cpp
  62. 2 3
      include/igl/edge_collapse_is_valid.cpp
  63. 0 1
      include/igl/eigs.cpp
  64. 1 2
      include/igl/embree/unproject_onto_mesh.cpp
  65. 0 2
      include/igl/embree/unproject_onto_mesh.h
  66. 13 13
      include/igl/exact_geodesic.cpp
  67. 0 1
      include/igl/fast_find_self_intersections.cpp
  68. 4 17
      include/igl/fast_winding_number.cpp
  69. 0 1
      include/igl/grid.cpp
  70. 0 1
      include/igl/heat_geodesics.cpp
  71. 8 9
      include/igl/intrinsic_delaunay_triangulation.cpp
  72. 4 4
      include/igl/is_irregular_vertex.cpp
  73. 2 3
      include/igl/is_irregular_vertex.h
  74. 2 6
      include/igl/is_sparse.cpp
  75. 0 1
      include/igl/is_vertex_manifold.cpp
  76. 15 27
      include/igl/isolines_intrinsic.cpp
  77. 0 3
      include/igl/iterative_closest_point.cpp
  78. 0 1
      include/igl/loop.cpp
  79. 1 1
      include/igl/marching_cubes.cpp
  80. 0 1
      include/igl/matlab/prepare_lhs.cpp
  81. 0 1
      include/igl/min_quad_with_fixed.impl.h
  82. 2 0
      include/igl/octree.cpp
  83. 1 1
      include/igl/opengl/ViewerCore.cpp
  84. 9 12
      include/igl/opengl/ViewerData.cpp
  85. 5 7
      include/igl/opengl/ViewerData.h
  86. 15 12
      include/igl/opengl/glfw/Viewer.cpp
  87. 2 2
      include/igl/opengl/glfw/Viewer.h
  88. 12 12
      include/igl/opengl/glfw/ViewerPlugin.h
  89. 1 1
      include/igl/opengl/glfw/background_window.cpp
  90. 6 6
      include/igl/opengl/glfw/imgui/ImGuiWidget.h
  91. 6 5
      include/igl/opengl/glfw/imgui/SelectionWidget.cpp
  92. 2 2
      include/igl/opengl/init_render_to_texture.cpp
  93. 1 2
      include/igl/opengl/stb/render_to_file.cpp
  94. 1 3
      include/igl/opengl/stb/render_to_file.h
  95. 3 5
      include/igl/opengl/stb/render_to_file_async.cpp
  96. 1 3
      include/igl/opengl/stb/render_to_file_async.h
  97. 2 1
      include/igl/opengl/vertex_array.cpp
  98. 7 7
      include/igl/predicates/predicates.cpp
  99. 0 2
      include/igl/predicates/segment_segment_intersect.cpp
  100. 6 5
      include/igl/principal_curvature.cpp

+ 3 - 0
CMakeLists.txt

@@ -6,6 +6,8 @@ else()
     set(LIBIGL_TOPLEVEL_PROJECT OFF)
 endif()
 
+
+
 # Check required CMake version
 set(REQUIRED_CMAKE_VERSION "3.16.0")
 if(LIBIGL_TOPLEVEL_PROJECT)
@@ -119,6 +121,7 @@ option(LIBIGL_RESTRICTED_MATLAB   "Build target igl_restricted::matlab"   ${LIBI
 option(LIBIGL_RESTRICTED_MOSEK    "Build target igl_restricted::mosek"    ${LIBIGL_DEFAULT_MOSEK})
 option(LIBIGL_RESTRICTED_TRIANGLE "Build target igl_restricted::triangle" ${LIBIGL_TOPLEVEL_PROJECT})
 
+option(LIBIGL_WARNINGS_AS_ERRORS "Turn on many warnings and treat as errors" OFF)
 
 set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
 set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib")

+ 5 - 0
cmake/igl/igl_add_library.cmake

@@ -36,12 +36,17 @@ function(igl_add_library module_name)
     # C++11 features
     target_compile_features(${module_name} ${IGL_SCOPE} cxx_std_11)
 
+    if(LIBIGL_WARNINGS_AS_ERRORS)
+      target_compile_options(${module_name} PRIVATE -Wall -Wextra -Wpedantic -Wno-sign-compare -Werror -Wno-gnu -Wno-unknown-pragmas)
+    endif()
+
     # Other compilation flags
     if(MSVC)
         # Enable parallel compilation for Visual Studio
         target_compile_options(${module_name} ${IGL_SCOPE} $<$<COMPILE_LANGUAGE:CXX>:/MP> $<$<COMPILE_LANGUAGE:CXX>:/bigobj>)
         target_compile_definitions(${module_name} ${IGL_SCOPE} -DNOMINMAX)
 
+
         # Silencing some compilation warnings
         if(LIBIGL_USE_STATIC_LIBRARY)
             target_compile_options(${module_name} PRIVATE

+ 1 - 12
include/igl/AABB.cpp

@@ -804,11 +804,7 @@ IGL_INLINE void igl::AABB<DerivedV,DIM>::leaf_squared_distance(
 
 template <typename DerivedV, int DIM>
 IGL_INLINE void igl::AABB<DerivedV,DIM>::set_min(
-  const RowVectorDIMS &
-#ifndef NDEBUG
-  p
-#endif
-  ,
+  const RowVectorDIMS & /* p */,
   const Scalar sqr_d_candidate,
   const int i_candidate,
   const RowVectorDIMS & c_candidate,
@@ -816,13 +812,6 @@ IGL_INLINE void igl::AABB<DerivedV,DIM>::set_min(
   int & i,
   Eigen::PlainObjectBase<RowVectorDIMS> & c) const
 {
-#ifndef NDEBUG
-  //std::cout<<matlab_format(c_candidate,"c_candidate")<<std::endl;
-  //// This doesn't quite make sense to check with bounds
-  // const Scalar pc_norm = (p-c_candidate).squaredNorm();
-  // const Scalar diff = fabs(sqr_d_candidate - pc_norm);
-  // assert(diff<=1e-10 && "distance should match norm of difference");
-#endif
   if(sqr_d_candidate < sqr_d)
   {
     i = i_candidate;

+ 13 - 12
include/igl/AtA_cached.cpp

@@ -6,6 +6,7 @@
 // v. 2.0. If a copy of the MPL was not distributed with this file, You can
 // obtain one at http://mozilla.org/MPL/2.0/.
 #include "AtA_cached.h"
+#include "IGL_ASSERT.h"
 
 #include <iostream>
 #include <vector>
@@ -34,12 +35,12 @@ IGL_INLINE void igl::AtA_cached_precompute(
       int col = k;
       int row = *(A.innerIndexPtr()+l);
       int value_index = l;
-      assert(col < A.cols());
-      assert(col >= 0);
-      assert(row < A.rows());
-      assert(row >= 0);
-      assert(value_index >= 0);
-      assert(value_index < A.nonZeros());
+      IGL_ASSERT(col < A.cols());
+      IGL_ASSERT(col >= 0);
+      IGL_ASSERT(row < A.rows());
+      IGL_ASSERT(row >= 0);
+      IGL_ASSERT(value_index >= 0);
+      IGL_ASSERT(value_index < A.nonZeros());
 
       Col_RowPtr[col].push_back(row);
       Col_IndexPtr[col].push_back(value_index);
@@ -74,12 +75,12 @@ IGL_INLINE void igl::AtA_cached_precompute(
       int col = k;
       int row = *(AtA.innerIndexPtr()+l);
       int value_index = l;
-      assert(col < AtA.cols());
-      assert(col >= 0);
-      assert(row < AtA.rows());
-      assert(row >= 0);
-      assert(value_index >= 0);
-      assert(value_index < AtA.nonZeros());
+      IGL_ASSERT(col < AtA.cols());
+      IGL_ASSERT(col >= 0);
+      IGL_ASSERT(row < AtA.rows());
+      IGL_ASSERT(row >= 0);
+      IGL_ASSERT(value_index >= 0);
+      IGL_ASSERT(value_index < AtA.nonZeros());
 
       data.I_outer.push_back(data.I_row.size());
 

+ 67 - 67
include/igl/FastWindingNumberForSoups.h

@@ -200,10 +200,10 @@ typedef union SYS_FPRealUnionT<fpreal64>    SYS_FPRealUnionD;
 
 /// Asserts are disabled
 /// @{
-#define UT_ASSERT_P(ZZ)         ((void)0)
-#define UT_ASSERT(ZZ)           ((void)0)
-#define UT_ASSERT_MSG_P(ZZ, MM) ((void)0)
-#define UT_ASSERT_MSG(ZZ, MM)   ((void)0)
+#define UT_IGL_ASSERT_P(ZZ)         ((void)0)
+#define UT_IGL_ASSERT(ZZ)           ((void)0)
+#define UT_IGL_ASSERT_MSG_P(ZZ, MM) ((void)0)
+#define UT_IGL_ASSERT_MSG(ZZ, MM)   ((void)0)
 /// @}
 }}
 
@@ -1961,7 +1961,7 @@ public:
     ///       asserts are enabled.
     T &		    operator()(exint i)
     {
-        UT_ASSERT_P(i >= 0 && i < mySize);
+        UT_IGL_ASSERT_P(i >= 0 && i < mySize);
         return myData[i];
     }
     /// Const subscript operator
@@ -1969,7 +1969,7 @@ public:
     ///       asserts are enabled.
     const T &	    operator()(exint i) const
     {
-	UT_ASSERT_P(i >= 0 && i < mySize);
+	UT_IGL_ASSERT_P(i >= 0 && i < mySize);
 	return myData[i];
     }
 
@@ -1978,7 +1978,7 @@ public:
     ///       asserts are enabled.
     T &		    operator[](exint i)
     {
-        UT_ASSERT_P(i >= 0 && i < mySize);
+        UT_IGL_ASSERT_P(i >= 0 && i < mySize);
         return myData[i];
     }
     /// Const subscript operator
@@ -1986,7 +1986,7 @@ public:
     ///       asserts are enabled.
     const T &	    operator[](exint i) const
     {
-	UT_ASSERT_P(i >= 0 && i < mySize);
+	UT_IGL_ASSERT_P(i >= 0 && i < mySize);
 	return myData[i];
     }
     
@@ -1995,7 +1995,7 @@ public:
     /// class types.
     T &             forcedRef(exint i)
     {
-        UT_ASSERT_P(i >= 0);
+        UT_IGL_ASSERT_P(i >= 0);
         if (i >= mySize)
             bumpSize(i+1);
         return myData[i];
@@ -2010,12 +2010,12 @@ public:
 
     T &		    last()
     {
-        UT_ASSERT_P(mySize);
+        UT_IGL_ASSERT_P(mySize);
         return myData[mySize-1];
     }
     const T &	    last() const
     {
-        UT_ASSERT_P(mySize);
+        UT_IGL_ASSERT_P(mySize);
         return myData[mySize-1];
     }
 
@@ -2541,7 +2541,7 @@ UT_Array<T>::insert(exint index)
     }
     bumpCapacity(mySize + 1);
 
-    UT_ASSERT_P(index >= 0);
+    UT_IGL_ASSERT_P(index >= 0);
     ::memmove((void *)&myData[index+1], (void *)&myData[index],
               ((mySize-index)*sizeof(T)));
 
@@ -2599,7 +2599,7 @@ template <typename T>
 inline void
 UT_Array<T>::appendMultiple(const T &t, exint count)
 {
-    UT_ASSERT_P(count >= 0);
+    UT_IGL_ASSERT_P(count >= 0);
     if (count <= 0)
 	return;
     if (mySize + count >= myCapacity)
@@ -2723,8 +2723,8 @@ template <typename T>
 inline void
 UT_Array<T>::removeRange(exint begin_i, exint end_i)
 {
-    UT_ASSERT(begin_i <= end_i);
-    UT_ASSERT(end_i <= size());
+    UT_IGL_ASSERT(begin_i <= end_i);
+    UT_IGL_ASSERT(end_i <= size());
     if (end_i < size())
     {
 	trivialDestructRange(myData + begin_i, end_i - begin_i);
@@ -2738,10 +2738,10 @@ template <typename T>
 inline void
 UT_Array<T>::extractRange(exint begin_i, exint end_i, UT_Array<T>& dest)
 {
-    UT_ASSERT_P(begin_i >= 0);
-    UT_ASSERT_P(begin_i <= end_i);
-    UT_ASSERT_P(end_i <= size());
-    UT_ASSERT(this != &dest);
+    UT_IGL_ASSERT_P(begin_i >= 0);
+    UT_IGL_ASSERT_P(begin_i <= end_i);
+    UT_IGL_ASSERT_P(end_i <= size());
+    UT_IGL_ASSERT(this != &dest);
 
     exint nelements = end_i - begin_i;
 
@@ -2832,7 +2832,7 @@ UT_Array<T>::removeIf(IsEqual is_equal)
     {
 	if (!is_equal(myData[idx]))
 	{
-	    UT_ASSERT(idx != dst);
+	    UT_IGL_ASSERT(idx != dst);
 	    myData[dst] = myData[idx];
 	    dst++;
 	}
@@ -2907,7 +2907,7 @@ UT_Array<T>::setCapacity(exint capacity)
 	    T *prev = myData;
 	    myData = (T *)malloc(sizeof(T) * capacity);
 	    // myData is safe because we're already a stack buffer
-	    UT_ASSERT_P(isHeapBuffer());
+	    UT_IGL_ASSERT_P(isHeapBuffer());
 	    if (mySize > 0)
 		memcpy((void *)myData, (void *)prev, sizeof(T) * mySize);
 	    myCapacity = capacity;
@@ -2915,7 +2915,7 @@ UT_Array<T>::setCapacity(exint capacity)
 	else 
 	{
 	    // Keep myCapacity unchanged in this case
-	    UT_ASSERT_P(capacity >= mySize && capacity <= myCapacity);
+	    UT_IGL_ASSERT_P(capacity >= mySize && capacity <= myCapacity);
 	}
 	return;
     }
@@ -2955,7 +2955,7 @@ UT_Array<T>::setCapacity(exint capacity)
     }
 
     myCapacity = capacity;
-    UT_ASSERT(myData);
+    UT_IGL_ASSERT(myData);
 }
 
 template <typename T>
@@ -3119,14 +3119,14 @@ public:
 // easily suppress this because it has to be done in the caller at
 // instantiation time. Instead, punt to a runtime check instead.
 #if defined(__clang__) || defined(_MSC_VER)
-    #define UT_SMALL_ARRAY_SIZE_ASSERT()    \
+    #define UT_SMALL_ARRAY_SIZE_IGL_ASSERT()    \
         using ThisT = UT_SmallArray<T,MAX_BYTES>; \
 	static_assert(offsetof(ThisT, myBuffer) == sizeof(UT_Array<T>), \
             "In order for UT_Array's checks for whether it needs to free the buffer to work, " \
             "the buffer must be exactly following the base class memory.")
 #else
-    #define UT_SMALL_ARRAY_SIZE_ASSERT()    \
-	UT_ASSERT_P(!UT_Array<T>::isHeapBuffer());
+    #define UT_SMALL_ARRAY_SIZE_IGL_ASSERT()    \
+	UT_IGL_ASSERT_P(!UT_Array<T>::isHeapBuffer());
 #endif
 
     /// Default construction
@@ -3134,7 +3134,7 @@ public:
 	: UT_Array<T>(/*capacity*/0)
     {
 	UT_Array<T>::unsafeShareData((T*)myBuffer, 0, MAX_ELEMS);
-	UT_SMALL_ARRAY_SIZE_ASSERT();
+	UT_SMALL_ARRAY_SIZE_IGL_ASSERT();
     }
     
     /// Copy constructor
@@ -3143,14 +3143,14 @@ public:
 	: UT_Array<T>(/*capacity*/0)
     {
 	UT_Array<T>::unsafeShareData((T*)myBuffer, 0, MAX_ELEMS);
-	UT_SMALL_ARRAY_SIZE_ASSERT();
+	UT_SMALL_ARRAY_SIZE_IGL_ASSERT();
 	UT_Array<T>::operator=(copy);
     }
     explicit UT_SmallArray(const UT_SmallArray<T,MAX_BYTES> &copy)
 	: UT_Array<T>(/*capacity*/0)
     {
 	UT_Array<T>::unsafeShareData((T*)myBuffer, 0, MAX_ELEMS);
-	UT_SMALL_ARRAY_SIZE_ASSERT();
+	UT_SMALL_ARRAY_SIZE_IGL_ASSERT();
 	UT_Array<T>::operator=(copy);
     }
     /// @}
@@ -3160,13 +3160,13 @@ public:
     UT_SmallArray(UT_Array<T> &&movable) noexcept
     {
 	UT_Array<T>::unsafeShareData((T*)myBuffer, 0, MAX_ELEMS);
-	UT_SMALL_ARRAY_SIZE_ASSERT();
+	UT_SMALL_ARRAY_SIZE_IGL_ASSERT();
 	UT_Array<T>::operator=(std::move(movable));
     }
     UT_SmallArray(UT_SmallArray<T,MAX_BYTES> &&movable) noexcept
     {
 	UT_Array<T>::unsafeShareData((T*)myBuffer, 0, MAX_ELEMS);
-	UT_SMALL_ARRAY_SIZE_ASSERT();
+	UT_SMALL_ARRAY_SIZE_IGL_ASSERT();
 	UT_Array<T>::operator=(std::move(movable));
     }
     /// @}
@@ -3175,11 +3175,11 @@ public:
     explicit UT_SmallArray(std::initializer_list<T> init)
     {
         UT_Array<T>::unsafeShareData((T*)myBuffer, 0, MAX_ELEMS);
-        UT_SMALL_ARRAY_SIZE_ASSERT();
+        UT_SMALL_ARRAY_SIZE_IGL_ASSERT();
         UT_Array<T>::operator=(init);
     }
 
-#undef UT_SMALL_ARRAY_SIZE_ASSERT
+#undef UT_SMALL_ARRAY_SIZE_IGL_ASSERT
 
     /// Assignment operator
     /// @{
@@ -3303,12 +3303,12 @@ public:
 
     SYS_FORCE_INLINE const T &operator[](exint i) const noexcept
     {
-        UT_ASSERT_P(i >= 0 && i < SIZE);
+        UT_IGL_ASSERT_P(i >= 0 && i < SIZE);
         return vec[i];
     }
     SYS_FORCE_INLINE T &operator[](exint i) noexcept
     {
-        UT_ASSERT_P(i >= 0 && i < SIZE);
+        UT_IGL_ASSERT_P(i >= 0 && i < SIZE);
         return vec[i];
     }
 
@@ -3816,9 +3816,9 @@ namespace UT_Thread { inline int getNumProcessors() {
 //{
 //    const size_t num_processors( UT_Thread::getNumProcessors() );
 //
-//    UT_ASSERT( num_processors >= 1 );
-//    UT_ASSERT( min_grain_size >= 1 );
-//    UT_ASSERT( subscribe_ratio >= 0 );
+//    UT_IGL_ASSERT( num_processors >= 1 );
+//    UT_IGL_ASSERT( min_grain_size >= 1 );
+//    UT_IGL_ASSERT( subscribe_ratio >= 0 );
 //
 //    const size_t est_range_size( UTestimatedNumItems(range) );
 //
@@ -3948,11 +3948,11 @@ struct Box {
     }
 
     SYS_FORCE_INLINE const T* operator[](const size_t axis) const noexcept {
-        UT_ASSERT_P(axis < NAXES);
+        UT_IGL_ASSERT_P(axis < NAXES);
         return vals[axis];
     }
     SYS_FORCE_INLINE T* operator[](const size_t axis) noexcept {
-        UT_ASSERT_P(axis < NAXES);
+        UT_IGL_ASSERT_P(axis < NAXES);
         return vals[axis];
     }
 
@@ -4402,7 +4402,7 @@ private:
             T diameter2 = box.diameter2();
             return diameter2*SYSsqrt(diameter2);
         }
-        UT_ASSERT_MSG(0, "BVH_Heuristic::MEDIAN_MAX_AXIS should be handled separately by caller!");
+        UT_IGL_ASSERT_MSG(0, "BVH_Heuristic::MEDIAN_MAX_AXIS should be handled separately by caller!");
         return T(1);
     }
 
@@ -4535,8 +4535,8 @@ struct ut_BoxCentre<UT_FixedVector<T,NAXES,INSTANTIATED>> {
 template<typename BOX_TYPE,typename SRC_INT_TYPE,typename INT_TYPE>
 inline INT_TYPE utExcludeNaNInfBoxIndices(const BOX_TYPE* boxes, SRC_INT_TYPE* indices, INT_TYPE& nboxes) noexcept 
 {
-    constexpr INT_TYPE PARALLEL_THRESHOLD = 65536;
-    INT_TYPE ntasks = 1;
+    //constexpr INT_TYPE PARALLEL_THRESHOLD = 65536;
+    //INT_TYPE ntasks = 1;
     //if (nboxes >= PARALLEL_THRESHOLD) 
     //{
     //    INT_TYPE nprocessors = UT_Thread::getNumProcessors();
@@ -4774,7 +4774,7 @@ inline void BVH<N>::traverseParallelHelper(
             }
             const INT_TYPE node_int = node.child[s];
             if (Node::isInternal(node_int)) {
-                UT_ASSERT_MSG_P(node_int != Node::EMPTY, "Empty entries should have been excluded above.");
+                UT_IGL_ASSERT_MSG_P(node_int != Node::EMPTY, "Empty entries should have been excluded above.");
                 traverseParallelHelper(Node::getInternalNum(node_int), nodei, parallel_threshold, next_nodes[s], functors, &local_data[s]);
             }
             else {
@@ -4851,7 +4851,7 @@ inline void BVH<N>::traverseVectorHelper(
 template<uint N>
 template<typename SRC_INT_TYPE>
 inline void BVH<N>::createTrivialIndices(SRC_INT_TYPE* indices, const INT_TYPE n) noexcept {
-    igl::parallel_for(n, [indices,n](INT_TYPE i) { indices[i] = i; }, 65536);
+    igl::parallel_for(n, [indices](INT_TYPE i) { indices[i] = i; }, 65536);
 }
 
 template<uint N>
@@ -4980,7 +4980,7 @@ inline void BVH<N>::initNode(UT_Array<Node>& nodes, Node &node, const Box<T,NAXE
                     ++counted_parallel;
                 }
             }
-            UT_ASSERT_P(counted_parallel == taski);
+            UT_IGL_ASSERT_P(counted_parallel == taski);
 
             UT_Array<Node>& local_nodes = parallel_nodes[taski];
             // Preallocate an overestimate of the number of nodes needed.
@@ -5174,7 +5174,7 @@ inline void BVH<N>::initNodeReorder(UT_Array<Node>& nodes, Node &node, const Box
       //                  ++counted_parallel;
       //              }
       //          }
-      //          UT_ASSERT_P(counted_parallel == taski);
+      //          UT_IGL_ASSERT_P(counted_parallel == taski);
 
       //          UT_Array<Node>& local_nodes = parallel_nodes[taski];
       //          // Preallocate an overestimate of the number of nodes needed.
@@ -5297,7 +5297,7 @@ inline void BVH<N>::multiSplit(const Box<T,NAXES>& axes_minmax, const BOX_TYPE*
                         box = sub_boxes_unsorted[j];
                     }
                 }
-                UT_ASSERT_P(min_pointer);
+                UT_IGL_ASSERT_P(min_pointer);
                 sub_indices[i] = min_pointer;
                 sub_boxes[i] = box;
             }
@@ -5321,7 +5321,7 @@ inline void BVH<N>::multiSplit(const Box<T,NAXES>& axes_minmax, const BOX_TYPE*
                     }
                 }
             }
-            UT_ASSERT_MSG_P(split_choice != INT_TYPE(-1), "There should always be at least one that can be split!");
+            UT_IGL_ASSERT_MSG_P(split_choice != INT_TYPE(-1), "There should always be at least one that can be split!");
 
             SRC_INT_TYPE* selected_start = sub_indices[split_choice];
             SRC_INT_TYPE* selected_end = sub_indices[split_choice+1];
@@ -5354,10 +5354,10 @@ inline void BVH<N>::split(const Box<T,NAXES>& axes_minmax, const BOX_TYPE* boxes
         split_indices = indices+1;
         return;
     }
-    UT_ASSERT_MSG_P(nboxes > 2, "Cases with less than 3 boxes should have already been handled!");
+    UT_IGL_ASSERT_MSG_P(nboxes > 2, "Cases with less than 3 boxes should have already been handled!");
 
     if (H == BVH_Heuristic::MEDIAN_MAX_AXIS) {
-        UT_ASSERT_MSG(0, "FIXME: Implement this!!!");
+        UT_IGL_ASSERT_MSG(0, "FIXME: Implement this!!!");
     }
 
     constexpr INT_TYPE SMALL_LIMIT = 6;
@@ -5683,9 +5683,9 @@ inline void BVH<N>::split(const Box<T,NAXES>& axes_minmax, const BOX_TYPE* boxes
 
     // Check which split is optimal, making sure that at least 1/MIN_FRACTION of all boxes are on each side.
     const INT_TYPE min_count = nboxes/MIN_FRACTION;
-    UT_ASSERT_MSG_P(min_count > 0, "MID_LIMIT above should have been large enough that nboxes would be > MIN_FRACTION");
+    UT_IGL_ASSERT_MSG_P(min_count > 0, "MID_LIMIT above should have been large enough that nboxes would be > MIN_FRACTION");
     const INT_TYPE max_count = ((MIN_FRACTION-1)*uint64(nboxes))/MIN_FRACTION;
-    UT_ASSERT_MSG_P(max_count < nboxes, "I'm not sure how this could happen mathematically, but it needs to be checked.");
+    UT_IGL_ASSERT_MSG_P(max_count < nboxes, "I'm not sure how this could happen mathematically, but it needs to be checked.");
     T smallest_heuristic = std::numeric_limits<T>::infinity();
     INT_TYPE split_index = -1;
     for (INT_TYPE spliti = 0; spliti < NSPLITS; ++spliti) {
@@ -5820,7 +5820,7 @@ inline void BVH<N>::adjustParallelChildNodes(INT_TYPE nparallel, UT_Array<Node>&
                     ++counted_parallel;
                 }
             }
-            UT_ASSERT_P(counted_parallel == taski);
+            UT_IGL_ASSERT_P(counted_parallel == taski);
 
             const UT_Array<Node>& local_nodes = parallel_nodes[counted_parallel];
             INT_TYPE n = local_nodes.size();
@@ -6661,11 +6661,11 @@ inline void UT_SolidAngle<T,S>::init(
             , myPositions(positions)
             , myOrder(order)
         {}
-        constexpr SYS_FORCE_INLINE bool pre(const int nodei, LocalData *data_for_parent) const
+        constexpr SYS_FORCE_INLINE bool pre(const int /*nodei*/, LocalData * /*data_for_parent*/) const
         {
             return true;
         }
-        void item(const int itemi, const int parent_nodei, LocalData &data_for_parent) const
+        void item(const int itemi, const int /*parent_nodei*/, LocalData &data_for_parent) const
         {
             const UT_Vector3T<S> *const positions = myPositions;
             const int *const cur_triangle_points = myTrianglePoints + 3*itemi;
@@ -6776,9 +6776,9 @@ inline void UT_SolidAngle<T,S>::init(
                 const UT_Vector3T<T> oab = b - a;
                 const UT_Vector3T<T> oac = c - a;
                 const UT_Vector3T<T> ocb = b - c;
-                UT_ASSERT_MSG_P(oac[i] > 0, "This should have been checked by the caller.");
+                UT_IGL_ASSERT_MSG_P(oac[i] > 0, "This should have been checked by the caller.");
                 const T t = oab[i]/oac[i];
-                UT_ASSERT_MSG_P(t >= 0 && t <= 1, "Either sorting must have gone wrong, or there are input NaNs.");
+                UT_IGL_ASSERT_MSG_P(t >= 0 && t <= 1, "Either sorting must have gone wrong, or there are input NaNs.");
 
                 const int j = (i==2) ? 0 : (i+1);
                 const int k = (j==2) ? 0 : (j+1);
@@ -6889,7 +6889,7 @@ inline void UT_SolidAngle<T,S>::init(
 #endif
         }
 
-        void post(const int nodei, const int parent_nodei, LocalData *data_for_parent, const int nchildren, const LocalData *child_data_array) const
+        void post(const int nodei, const int /*parent_nodei*/, LocalData *data_for_parent, const int nchildren, const LocalData *child_data_array) const
         {
             // NOTE: Although in the general case, data_for_parent may be null for the root call,
             //       this functor assumes that it's non-null, so the call below must pass a non-null pointer.
@@ -7169,9 +7169,9 @@ inline T UT_SolidAngle<T, S>::computeSolidAngle(const UT_Vector3T<T> &query_poin
             : myBoxData(box_data)
             , myQueryPoint(query_point)
             , myAccuracyScale2(accuracy_scale2)
-            , myOrder(order)
             , myPositions(positions)
             , myTrianglePoints(triangle_points)
+            , myOrder(order)
         {}
         uint pre(const int nodei, T *data_for_parent) const
         {
@@ -7257,7 +7257,7 @@ inline T UT_SolidAngle<T, S>::computeSolidAngle(const UT_Vector3T<T> &query_poin
 
             return descend_bitmask;
         }
-        void item(const int itemi, const int parent_nodei, T &data_for_parent) const
+        void item(const int itemi, const int /*parent_nodei*/, T &data_for_parent) const
         {
             const UT_Vector3T<S> *const positions = myPositions;
             const int *const cur_triangle_points = myTrianglePoints + 3*itemi;
@@ -7267,7 +7267,7 @@ inline T UT_SolidAngle<T, S>::computeSolidAngle(const UT_Vector3T<T> &query_poin
 
             data_for_parent = UTsignedSolidAngleTri(a, b, c, myQueryPoint);
         }
-        SYS_FORCE_INLINE void post(const int nodei, const int parent_nodei, T *data_for_parent, const int nchildren, const T *child_data_array, const uint descend_bits) const
+        SYS_FORCE_INLINE void post(const int /*nodei*/, const int /*parent_nodei*/, T *data_for_parent, const int nchildren, const T *child_data_array, const uint descend_bits) const
         {
             T sum = (descend_bits&1) ? child_data_array[0] : 0;
             for (int i = 1; i < nchildren; ++i)
@@ -7446,11 +7446,11 @@ inline void UT_SubtendedAngle<T,S>::init(
             , myPositions(positions)
             , myOrder(order)
         {}
-        constexpr SYS_FORCE_INLINE bool pre(const int nodei, LocalData *data_for_parent) const
+        constexpr SYS_FORCE_INLINE bool pre(const int /*nodei*/, LocalData * /*data_for_parent*/) const
         {
             return true;
         }
-        void item(const int itemi, const int parent_nodei, LocalData &data_for_parent) const
+        void item(const int itemi, const int /*parent_nodei*/, LocalData &data_for_parent) const
         {
             const UT_Vector2T<S> *const positions = myPositions;
             const int *const cur_segment_points = mySegmentPoints + 2*itemi;
@@ -7516,7 +7516,7 @@ inline void UT_SubtendedAngle<T,S>::init(
 #endif
         }
 
-        void post(const int nodei, const int parent_nodei, LocalData *data_for_parent, const int nchildren, const LocalData *child_data_array) const
+        void post(const int nodei, const int /*parent_nodei*/, LocalData *data_for_parent, const int nchildren, const LocalData *child_data_array) const
         {
             // NOTE: Although in the general case, data_for_parent may be null for the root call,
             //       this functor assumes that it's non-null, so the call below must pass a non-null pointer.
@@ -7798,7 +7798,7 @@ inline T UT_SubtendedAngle<T, S>::computeAngle(const UT_Vector2T<T> &query_point
 
             return descend_bitmask;
         }
-        void item(const int itemi, const int parent_nodei, T &data_for_parent) const
+        void item(const int itemi, const int /*parent_nodei*/, T &data_for_parent) const
         {
             const UT_Vector2T<S> *const positions = myPositions;
             const int *const cur_segment_points = mySegmentPoints + 2*itemi;
@@ -7807,7 +7807,7 @@ inline T UT_SubtendedAngle<T, S>::computeAngle(const UT_Vector2T<T> &query_point
 
             data_for_parent = UTsignedAngleSegment(a, b, myQueryPoint);
         }
-        SYS_FORCE_INLINE void post(const int nodei, const int parent_nodei, T *data_for_parent, const int nchildren, const T *child_data_array, const uint descend_bits) const
+        SYS_FORCE_INLINE void post(const int /*nodei*/, const int /*parent_nodei*/, T *data_for_parent, const int nchildren, const T *child_data_array, const uint descend_bits) const
         {
             T sum = (descend_bits&1) ? child_data_array[0] : 0;
             for (int i = 1; i < nchildren; ++i)

+ 1 - 1
include/igl/FileMemoryStream.h

@@ -32,7 +32,7 @@ namespace igl {
     pos_type seekoff(
       off_type off, 
       std::ios_base::seekdir dir,
-      std::ios_base::openmode which) override 
+      std::ios_base::openmode /*which*/) override 
     {
       if (dir == std::ios_base::cur) 
       {

+ 9 - 0
include/igl/IGL_ASSERT.h

@@ -0,0 +1,9 @@
+// https://stackoverflow.com/a/985807/148668
+#include <cassert>
+#ifndef IGL_ASSERT
+#ifdef NDEBUG
+#define IGL_ASSERT(x) do { (void)sizeof(x);} while (0)
+#else
+#define IGL_ASSERT(x) assert(x)
+#endif
+#endif

+ 0 - 4
include/igl/MshSaver.cpp

@@ -105,7 +105,6 @@ IGL_INLINE void igl::MshSaver::save_elements(const IndexVector& elements,
 
     if (m_num_elements > 0) {
         //int elem_type = el_type;
-        int num_elems = m_num_elements;
         //int tags = 0;
         if (!m_binary) {
             size_t el_ptr=0;
@@ -213,7 +212,6 @@ IGL_INLINE void igl::MshSaver::save_vector_field(const std::string& fieldname, c
     fout << "3" << std::endl; // 3-component vector field.
     fout << m_num_nodes << std::endl; // number of nodes
 
-    const Float zero = 0.0;
     if (m_binary) {
         for (size_t i=0; i<m_num_nodes; i++) {
             int node_idx = i+1;
@@ -275,7 +273,6 @@ IGL_INLINE void igl::MshSaver::save_elem_vector_field(const std::string& fieldna
     fout << "3" << std::endl; // 3-component vector field.
     fout << m_num_elements << std::endl; // number of elements
 
-    const Float zero = 0.0;
     if (m_binary) {
         for (size_t i=0; i<m_num_elements; ++i) {
             int elem_idx = i+1;
@@ -310,7 +307,6 @@ IGL_INLINE void igl::MshSaver::save_elem_tensor_field(const std::string& fieldna
     fout << "9" << std::endl; // 9-component tensor field.
     fout << m_num_elements << std::endl; // number of elements
 
-    const Float zero = 0.0;
     
     if (m_binary) {
         for (size_t i=0; i<m_num_elements; i++) {

+ 5 - 0
include/igl/Singular_Value_Decomposition_Main_Kernel_Body.hpp

@@ -18,6 +18,9 @@
 #pragma warning( disable : 592 )
 #endif
 
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wuninitialized"
+
 // #define USE_ACCURATE_RSQRT_IN_JACOBI_CONJUGATION
 // #define PERFORM_STRICT_QUATERNION_RENORMALIZATION
 
@@ -1272,6 +1275,8 @@
 #endif
 #endif
 
+#pragma clang diagnostic pop
+
 #ifdef __INTEL_COMPILER
 #pragma warning( default : 592 )
 #endif

+ 1 - 1
include/igl/WindingNumberAABB.h

@@ -389,7 +389,7 @@ inline typename DerivedV::Scalar
 // _Define_ as a no-op rather than monkeying around with the proper code above
 namespace igl
 {
-  template <> inline igl::WindingNumberAABB<Eigen::Matrix<double, 1, 3, 1, 1, 3>,Eigen::Matrix<double, -1, 2, 0, -1, 2>,Eigen::Matrix<int, -1, 2, 0, -1, 2>>::WindingNumberAABB(const Eigen::MatrixBase<Eigen::Matrix<double, -1, 2, 0, -1, 2>> & V, const Eigen::MatrixBase<Eigen::Matrix<int, -1, 2, 0, -1, 2>> & F){};
+  template <> inline igl::WindingNumberAABB<Eigen::Matrix<double, 1, 3, 1, 1, 3>,Eigen::Matrix<double, -1, 2, 0, -1, 2>,Eigen::Matrix<int, -1, 2, 0, -1, 2>>::WindingNumberAABB(const Eigen::MatrixBase<Eigen::Matrix<double, -1, 2, 0, -1, 2>> & , const Eigen::MatrixBase<Eigen::Matrix<int, -1, 2, 0, -1, 2>> & ){};
   template <> inline void igl::WindingNumberAABB<Eigen::Matrix<double, 1, 3, 1, 1, 3>,Eigen::Matrix<double, -1, 2, 0, -1, 2>,Eigen::Matrix<int, -1, 2, 0, -1, 2>>::grow(){};
   template <> inline void igl::WindingNumberAABB<Eigen::Matrix<double, 1, 3, 1, 1, 3>,Eigen::Matrix<double, -1, 2, 0, -1, 2>,Eigen::Matrix<int, -1, 2, 0, -1, 2>>::init(){};
 

+ 1 - 1
include/igl/WindingNumberTree.h

@@ -214,7 +214,7 @@ inline igl::WindingNumberTree<Point,DerivedV,DerivedF>::WindingNumberTree(
 }
 
 template <typename Point, typename DerivedV, typename DerivedF>
-inline igl::WindingNumberTree<Point,DerivedV,DerivedF>::~WindingNumberTree()
+inline igl::WindingNumberTree<Point,DerivedV,DerivedF>::~WindingNumberTree<Point,DerivedV,DerivedF>()
 {
   delete_children();
 }

+ 8 - 0
include/igl/active_set.cpp

@@ -121,22 +121,28 @@ IGL_INLINE igl::SolverStatus igl::active_set(
     cout<<"  pre"<<endl;
 #endif
     // FIND BREACHES OF CONSTRAINTS
+#ifdef ACTIVE_SET_CPP_DEBUG
     int new_as_lx = 0;
     int new_as_ux = 0;
     int new_as_ieq = 0;
+#endif
     if(Z.size() > 0)
     {
       for(int z = 0;z < n;z++)
       {
         if(Z(z) < lx(z))
         {
+#ifdef ACTIVE_SET_CPP_DEBUG
           new_as_lx += (as_lx(z)?0:1);
+#endif
           //new_as_lx++;
           as_lx(z) = TRUE;
         }
         if(Z(z) > ux(z))
         {
+#ifdef ACTIVE_SET_CPP_DEBUG
           new_as_ux += (as_ux(z)?0:1);
+#endif
           //new_as_ux++;
           as_ux(z) = TRUE;
         }
@@ -149,7 +155,9 @@ IGL_INLINE igl::SolverStatus igl::active_set(
         {
           if(AieqZ(a) > Bieq(a))
           {
+#ifdef ACTIVE_SET_CPP_DEBUG
             new_as_ieq += (as_ieq(a)?0:1);
+#endif
             as_ieq(a) = TRUE;
           }
         }

+ 5 - 4
include/igl/arap_dof.cpp

@@ -6,6 +6,7 @@
 // v. 2.0. If a copy of the MPL was not distributed with this file, You can 
 // obtain one at http://mozilla.org/MPL/2.0/.
 #include "arap_dof.h"
+#include "IGL_ASSERT.h"
 
 #include "cotmatrix.h"
 #include "massmatrix.h"
@@ -619,10 +620,10 @@ IGL_INLINE bool igl::arap_dof_update(
 #endif
 
   // number of dimensions
-  assert((int)data.CSM_M.size() == data.dim);
-  assert((int)L0.size() == (data.m)*data.dim*(data.dim+1));
-  assert(max_iters >= 0);
-  assert(tol >= 0);
+  IGL_ASSERT((int)data.CSM_M.size() == data.dim);
+  IGL_ASSERT((int)L0.size() == (data.m)*data.dim*(data.dim+1));
+  IGL_ASSERT(max_iters >= 0);
+  IGL_ASSERT(tol >= 0);
 
   // timing variables
   double 

+ 0 - 1
include/igl/bijective_composite_harmonic_mapping.cpp

@@ -49,7 +49,6 @@ IGL_INLINE bool igl::bijective_composite_harmonic_mapping(
   typedef typename Derivedbc::Scalar Scalar;
   assert(V.cols() == 2 && bc.cols() == 2 && "Input should be 2D");
   assert(F.cols() == 3 && "F should contain triangles");
-  int tries = 0;
   int nsteps = min_steps;
   Eigen::Matrix<typename Derivedbc::Scalar, Eigen::Dynamic, Eigen::Dynamic> bc0;
   slice(V,b.col(0),1,bc0);

+ 0 - 1
include/igl/blkdiag.cpp

@@ -14,7 +14,6 @@ IGL_INLINE void igl::blkdiag(
 {
   int nr = 0;
   int nc = 0;
-  int nnz = 0;
   for(const auto & A : L)
   {
     nr += A.rows();

+ 0 - 2
include/igl/blue_noise.cpp

@@ -71,7 +71,6 @@ namespace igl
     const int xi = Xs(i,0);
     const int yi = Xs(i,1);
     const int zi = Xs(i,2);
-    BlueNoiseKeyType k = blue_noise_key(w,xi,yi,zi);
     int g = 2; // ceil(r/s)
     for(int x = std::max(xi-g,0);x<=std::min(xi+g,w-1);x++)
     for(int y = std::max(yi-g,0);y<=std::min(yi+g,w-1);y++)
@@ -257,7 +256,6 @@ IGL_INLINE void igl::blue_noise(
     URBG && urbg)
 {
   typedef typename DerivedV::Scalar Scalar;
-  typedef Eigen::Matrix<Scalar,Eigen::Dynamic,1> VectorXS;
   // float+RowMajor is faster...
   typedef Eigen::Matrix<Scalar,Eigen::Dynamic,3,Eigen::RowMajor> MatrixX3S;
   assert(V.cols() == 3 && "Only 3D embeddings allowed");

+ 0 - 1
include/igl/boundary_conditions.cpp

@@ -142,7 +142,6 @@ IGL_INLINE bool igl::boundary_conditions(
       Vector3d point = V.row(i);
       Vector3d v = point - v_0;
       double dist = abs(v.dot(n));
-      Vector3d projected_point = point - dist * n;
       if (dist <= 1.e-1f)
       {
         //barycentric coordinates

+ 1 - 1
include/igl/circulation.cpp

@@ -127,7 +127,7 @@ IGL_INLINE void igl::circulation(
   int ei = e;
   while(true)
   {
-    int re,rv;
+    int rv;
     step(ei,fi,ei/*,re*/,rv,fi);
     Nf.push_back(fi);
     //Ne.push_back(re);

+ 4 - 0
include/igl/collapse_small_triangles.cpp

@@ -92,7 +92,9 @@ void igl::collapse_small_triangles(
   }
 
   FF.resizeLike(rF);
+#ifndef NDEBUG
   int num_face_collapses=0;
+#endif
   // Only keep uncollapsed faces
   {
     int ff = 0;
@@ -108,7 +110,9 @@ void igl::collapse_small_triangles(
           if(rF(f,i)==rF(f,j))
           {
             collapsed = true;
+#ifndef NDEBUG
             num_face_collapses++;
+#endif
             break;
           }
         }

+ 2 - 2
include/igl/compute_frame_field_bisectors.cpp

@@ -17,8 +17,8 @@
 
 template <typename DerivedV, typename DerivedF>
 IGL_INLINE void igl::compute_frame_field_bisectors(
-  const Eigen::MatrixBase<DerivedV>& V,
-  const Eigen::MatrixBase<DerivedF>& F,
+  const Eigen::MatrixBase<DerivedV>& /*V*/,
+  const Eigen::MatrixBase<DerivedF>& /*F*/,
   const Eigen::MatrixBase<DerivedV>& B1,
   const Eigen::MatrixBase<DerivedV>& B2,
   const Eigen::MatrixBase<DerivedV>& PD1,

+ 2 - 0
include/igl/compute_frame_field_bisectors.h

@@ -23,6 +23,8 @@ namespace igl
   /// @param[out] BIS1  #F by 3 eigen Matrix of the first per face frame field bisector
   /// @param[out] BIS2  #F by 3 eigen Matrix of the second per face frame field bisector
   ///
+  /// \bug `V` and `F` are not used. If this function is actually being used we
+  /// should remove `V` and `F` here.
   template <typename DerivedV, typename DerivedF>
   IGL_INLINE void compute_frame_field_bisectors(
     const Eigen::MatrixBase<DerivedV>& V,

+ 0 - 1
include/igl/connect_boundary_to_infinity.cpp

@@ -25,7 +25,6 @@ IGL_INLINE void igl::connect_boundary_to_infinity(
   Eigen::Matrix<typename DerivedFO::Scalar,Eigen::Dynamic,Eigen::Dynamic> O;
   boundary_facets(F,O);
   FO.resize(F.rows()+O.rows(),F.cols());
-  typedef Eigen::Matrix<typename DerivedFO::Scalar,Eigen::Dynamic,1> VectorXI;
   FO.topLeftCorner(F.rows(),F.cols()) = F;
   FO.bottomLeftCorner(O.rows(),O.cols()) = O.rowwise().reverse();
   FO.bottomRightCorner(O.rows(),1).setConstant(inf_index);

+ 1 - 2
include/igl/copyleft/cgal/SelfIntersectMesh.h

@@ -244,7 +244,6 @@ namespace igl
 #include "mesh_to_cgal_triangle_list.h"
 #include "remesh_intersections.h"
 
-#include "../../REDRUM.h"
 #include "../../get_seconds.h"
 #include "../../C_STR.h"
 
@@ -631,7 +630,7 @@ inline bool igl::copyleft::cgal::SelfIntersectMesh<
       return true;
     }else
     {
-      cerr<<REDRUM("Segment ∩ triangle neither point nor segment?")<<endl;
+      cerr<<"Segment ∩ triangle neither point nor segment?"<<endl;
       assert(false);
     }
   }

+ 1 - 1
include/igl/copyleft/cgal/assign_scalar.cpp

@@ -53,7 +53,7 @@ IGL_INLINE void igl::copyleft::cgal::assign_scalar(
 template <typename RHS, typename LHS>
 IGL_INLINE void igl::copyleft::cgal::assign_scalar(
   const RHS & rhs,
-  const bool & slow_and_more_precise,
+  const bool & /*slow_and_more_precise*/,
   LHS & lhs)
 {
   return assign_scalar(rhs,lhs);

+ 7 - 12
include/igl/copyleft/cgal/closest_facet.cpp

@@ -59,7 +59,6 @@ IGL_INLINE void igl::copyleft::cgal::closest_facet(
   typedef typename CGAL::AABB_traits<Kernel, Primitive> AABB_triangle_traits;
   typedef typename CGAL::AABB_tree<AABB_triangle_traits> Tree;
 
-  const size_t num_faces = I.rows();
   if (F.rows() <= 0 || I.rows() <= 0) {
     throw std::runtime_error(
         "Closest facet cannot be computed on empty mesh.");
@@ -219,9 +218,11 @@ IGL_INLINE void igl::copyleft::cgal::closest_facet(
     }
   };
 
-  auto process_face_case = [&](
-      const size_t query_idx, const Point_3& closest_point,
-      const size_t fid, bool& orientation) -> size_t {
+  auto process_face_case = [&F,&I,&process_edge_case](
+    const size_t query_idx, 
+    const size_t fid, 
+    bool& orientation) -> size_t 
+  {
     const auto& f = F.row(I(fid, 0));
     return process_edge_case(query_idx, f[0], f[1], I(fid, 0), orientation);
   };
@@ -243,7 +244,6 @@ IGL_INLINE void igl::copyleft::cgal::closest_facet(
   auto process_vertex_case = [&](
     const size_t query_idx, 
     size_t s,
-    size_t preferred_facet, 
     bool& orientation) -> size_t
   {
     const Point_3 query_point(
@@ -299,7 +299,6 @@ IGL_INLINE void igl::copyleft::cgal::closest_facet(
     auto is_on_exterior = [&](const Plane_3& separator) -> bool{
       size_t positive=0;
       size_t negative=0;
-      size_t coplanar=0;
       for (const auto& point : adj_points) {
         switch(separator.oriented_side(point)) {
           case CGAL::ON_POSITIVE_SIDE:
@@ -309,7 +308,6 @@ IGL_INLINE void igl::copyleft::cgal::closest_facet(
             negative++;
             break;
           case CGAL::ON_ORIENTED_BOUNDARY:
-            coplanar++;
             break;
           default:
             throw "Unknown plane-point orientation";
@@ -400,7 +398,7 @@ IGL_INLINE void igl::copyleft::cgal::closest_facet(
         {
           const auto& f = F.row(I(fid, 0));
           const size_t s = f[element_index];
-          fid = process_vertex_case(i, s, I(fid, 0), fid_ori);
+          fid = process_vertex_case(i, s, fid_ori);
         }
         break;
       case EDGE:
@@ -413,7 +411,7 @@ IGL_INLINE void igl::copyleft::cgal::closest_facet(
         break;
       case FACE:
         {
-          fid = process_face_case(i, closest_point, fid, fid_ori);
+          fid = process_face_case(i, fid, fid_ori);
         }
         break;
       default:
@@ -449,9 +447,6 @@ IGL_INLINE void igl::copyleft::cgal::closest_facet(
 {
 
   typedef CGAL::Exact_predicates_exact_constructions_kernel Kernel;
-  typedef Kernel::Point_3 Point_3;
-  typedef Kernel::Plane_3 Plane_3;
-  typedef Kernel::Segment_3 Segment_3;
   typedef Kernel::Triangle_3 Triangle;
   typedef std::vector<Triangle>::iterator Iterator;
   typedef CGAL::AABB_triangle_primitive<Kernel, Iterator> Primitive;

+ 8 - 19
include/igl/copyleft/cgal/extract_cells.cpp

@@ -13,6 +13,7 @@
 #include "submesh_aabb_tree.h"
 #include "../../extract_manifold_patches.h"
 #include "../../facet_components.h"
+#include "../../IGL_ASSERT.h"
 #include "../../parallel_for.h"
 #include "../../get_seconds.h"
 #include "../../triangle_triangle_adjacency.h"
@@ -54,7 +55,7 @@ IGL_INLINE size_t igl::copyleft::cgal::extract_cells(
   igl::extract_manifold_patches(F, EMAP, uEC, uEE, P);
   // Extract cells
   DerivedC per_patch_cells;
-  const size_t ncells = extract_cells(V,F,P,E,uE,EMAP,uEC,uEE,per_patch_cells);
+  const size_t ncells = extract_cells(V,F,P,uE,EMAP,uEC,uEE,per_patch_cells);
   // Distribute per-patch cell information to each face
   cells.resize(num_faces, 2);
   for (size_t i=0; i<num_faces; i++)
@@ -69,7 +70,6 @@ template<
   typename DerivedV,
   typename DerivedF,
   typename DerivedP,
-  typename DerivedE,
   typename DeriveduE,
   typename DerivedEMAP,
   typename DeriveduEC,
@@ -79,7 +79,6 @@ IGL_INLINE size_t igl::copyleft::cgal::extract_cells(
   const Eigen::PlainObjectBase<DerivedV>& V,
   const Eigen::PlainObjectBase<DerivedF>& F,
   const Eigen::PlainObjectBase<DerivedP>& P,
-  const Eigen::PlainObjectBase<DerivedE>& E,
   const Eigen::PlainObjectBase<DeriveduE>& uE,
   const Eigen::PlainObjectBase<DerivedEMAP>& EMAP,
   const Eigen::PlainObjectBase<DeriveduEC>& uEC,
@@ -95,14 +94,6 @@ IGL_INLINE size_t igl::copyleft::cgal::extract_cells(
   }
 
   typedef CGAL::Exact_predicates_exact_constructions_kernel Kernel;
-  typedef Kernel::Point_3 Point_3;
-  typedef Kernel::Plane_3 Plane_3;
-  typedef Kernel::Segment_3 Segment_3;
-  typedef Kernel::Triangle_3 Triangle;
-  typedef std::vector<Triangle>::iterator Iterator;
-  typedef CGAL::AABB_triangle_primitive<Kernel, Iterator> Primitive;
-  typedef CGAL::AABB_traits<Kernel, Primitive> AABB_triangle_traits;
-  typedef CGAL::AABB_tree<AABB_triangle_traits> Tree;
 
 #ifdef EXTRACT_CELLS_TIMING
   const auto & tictoc = []() -> double
@@ -128,8 +119,8 @@ IGL_INLINE size_t igl::copyleft::cgal::extract_cells(
 
   // Extract all cells...
   DerivedC raw_cells;
-  const size_t num_raw_cells =
-    extract_cells_single_component(V,F,P,uE,EMAP,uEC,uEE,raw_cells);
+  const int num_raw_cells =
+    extract_cells_single_component(V,F,P,uE,uEC,uEE,raw_cells);
   log_time("extract_cells_single_component");
 
   // Compute triangle-triangle adjacency data-structure
@@ -333,8 +324,8 @@ IGL_INLINE size_t igl::copyleft::cgal::extract_cells(
                     break;
                 }
             }
-            assert(embedded_comp != INVALID);
-            assert(embedded_cell != INVALID);
+            IGL_ASSERT(embedded_comp != INVALID);
+            IGL_ASSERT(embedded_cell != INVALID);
             embedded_cells[outer_cell] = embedded_cell;
         } else {
             embedded_cells[outer_cell] = INFINITE_CELL;
@@ -387,11 +378,9 @@ IGL_INLINE size_t igl::copyleft::cgal::extract_cells(
 #include <CGAL/Exact_predicates_exact_constructions_kernel.h>
 // Explicit template instantiation
 // generated by autoexplicit.sh
-template size_t igl::copyleft::cgal::extract_cells<Eigen::Matrix<CGAL::Epeck::FT, -1, -1, 1, -1, -1>, Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, 1, 0, -1, 1>, Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, 1, 0, -1, 1>, Eigen::Matrix<int, -1, 1, 0, -1, 1>, Eigen::Matrix<int, -1, 1, 0, -1, 1>, Eigen::Matrix<int, -1, -1, 0, -1, -1> >(Eigen::PlainObjectBase<Eigen::Matrix<CGAL::Epeck::FT, -1, -1, 1, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> >&);
-// generated by autoexplicit.sh
 template size_t igl::copyleft::cgal::extract_cells<Eigen::Matrix<CGAL::Epeck::FT, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, -1, 0, -1, -1> >(Eigen::PlainObjectBase<Eigen::Matrix<CGAL::Epeck::FT, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> >&);
-// generated by autoexplicit.sh
-template size_t igl::copyleft::cgal::extract_cells<Eigen::Matrix<CGAL::Epeck::FT, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, 1, 0, -1, 1>, Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, 1, 0, -1, 1>, Eigen::Matrix<int, -1, 1, 0, -1, 1>, Eigen::Matrix<int, -1, 1, 0, -1, 1>, Eigen::Matrix<int, -1, -1, 0, -1, -1> >(Eigen::PlainObjectBase<Eigen::Matrix<CGAL::Epeck::FT, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> >&);
+template size_t igl::copyleft::cgal::extract_cells<Eigen::Matrix<CGAL::Epeck::FT, -1, -1, 1, -1, -1>, Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, 1, 0, -1, 1>, Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, 1, 0, -1, 1>, Eigen::Matrix<int, -1, 1, 0, -1, 1>, Eigen::Matrix<int, -1, 1, 0, -1, 1>, Eigen::Matrix<int, -1, -1, 0, -1, -1> >(Eigen::PlainObjectBase<Eigen::Matrix<CGAL::Epeck::FT, -1, -1, 1, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> >&);
+template size_t igl::copyleft::cgal::extract_cells<Eigen::Matrix<CGAL::Epeck::FT, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, 1, 0, -1, 1>, Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, 1, 0, -1, 1>, Eigen::Matrix<int, -1, 1, 0, -1, 1>, Eigen::Matrix<int, -1, 1, 0, -1, 1>, Eigen::Matrix<int, -1, -1, 0, -1, -1> >(Eigen::PlainObjectBase<Eigen::Matrix<CGAL::Epeck::FT, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> >&);
 #ifdef WIN32
 #endif
 #endif

+ 0 - 3
include/igl/copyleft/cgal/extract_cells.h

@@ -23,7 +23,6 @@ namespace igl {
       /// @param[in] V  #V by 3 array of vertices.
       /// @param[in] F  #F by 3 array of faces.
       /// @param[in] P  #F list of patch indices.
-      /// @param[in] E  #E by 2 array of vertex indices, one edge per row.
       /// @param[in] uE    #uE by 2 list of vertex_indices, represents undirected edges.
       /// @param[in] EMAP  #F*3 list of indices into uE.
       /// @param[in] uEC  #uE+1 list of cumsums of directed edges sharing each unique edge
@@ -37,7 +36,6 @@ namespace igl {
         typename DerivedV,
         typename DerivedF,
         typename DerivedP,
-        typename DerivedE,
         typename DeriveduE,
         typename DerivedEMAP,
         typename DeriveduEC,
@@ -47,7 +45,6 @@ namespace igl {
         const Eigen::PlainObjectBase<DerivedV>& V,
         const Eigen::PlainObjectBase<DerivedF>& F,
         const Eigen::PlainObjectBase<DerivedP>& P,
-        const Eigen::PlainObjectBase<DerivedE>& E,
         const Eigen::PlainObjectBase<DeriveduE>& uE,
         const Eigen::PlainObjectBase<DerivedEMAP>& EMAP,
         const Eigen::PlainObjectBase<DeriveduEC>& uEC,

+ 3 - 17
include/igl/copyleft/cgal/extract_cells_single_component.cpp

@@ -23,16 +23,14 @@ template<
   typename DerivedF,
   typename DerivedP,
   typename DeriveduE,
-  typename DerivedEMAP,
   typename DeriveduEC,
   typename DeriveduEE,
   typename DerivedC>
-IGL_INLINE size_t igl::copyleft::cgal::extract_cells_single_component(
+IGL_INLINE int igl::copyleft::cgal::extract_cells_single_component(
   const Eigen::PlainObjectBase<DerivedV>& V,
   const Eigen::PlainObjectBase<DerivedF>& F,
   const Eigen::PlainObjectBase<DerivedP>& P,
   const Eigen::PlainObjectBase<DeriveduE>& uE,
-  const Eigen::PlainObjectBase<DerivedEMAP>& EMAP,
   const Eigen::PlainObjectBase<DeriveduEC>& uEC,
   const Eigen::PlainObjectBase<DeriveduEE>& uEE,
   Eigen::PlainObjectBase<DerivedC>& cells)
@@ -91,8 +89,6 @@ IGL_INLINE size_t igl::copyleft::cgal::extract_cells_single_component(
   std::vector<std::map<size_t, size_t> > patch_adj(num_patches);
   for (size_t i=0; i<num_unique_edges; i++)
   {
-    const size_t s = uE(i,0);
-    const size_t d = uE(i,1);
     //const auto adj_faces = uE2E[i];
     //const size_t num_adj_faces = adj_faces.size();
     const size_t num_adj_faces = uEC(i+1)-uEC(i);
@@ -131,14 +127,11 @@ IGL_INLINE size_t igl::copyleft::cgal::extract_cells_single_component(
   std::vector<std::set<size_t> > equivalent_cells(num_patches*2);
   std::vector<bool> processed(num_unique_edges, false);
 
-  size_t label_count=0;
-  size_t order_facets_around_edge_calls = 0;
   // bottleneck appears to be `order_facets_around_edge`
   for (size_t i=0; i<num_patches; i++) 
   {
     for (const auto& entry : patch_adj[i]) 
     {
-      const size_t neighbor_patch = entry.first;
       const size_t uei = entry.second;
       if (processed[uei]) continue;
       processed[uei] = true;
@@ -165,7 +158,6 @@ IGL_INLINE size_t igl::copyleft::cgal::extract_cells_single_component(
         Eigen::VectorXi order;
         // order[f] will reveal the order of face f in signed_adj_faces
         order_facets_around_edge(V, F, s, d, signed_adj_faces, order);
-        order_facets_around_edge_calls++;
         for (size_t j=0; j<num_adj_faces; j++) 
         {
           const size_t curr_idx = j;
@@ -222,12 +214,6 @@ IGL_INLINE size_t igl::copyleft::cgal::extract_cells_single_component(
 #ifdef IGL_STATIC_LIBRARY
 #include <CGAL/Exact_predicates_exact_constructions_kernel.h>
 // Explicit template instantiation
-// generated by autoexplicit.sh
-template size_t igl::copyleft::cgal::extract_cells_single_component<Eigen::Matrix<CGAL::Epeck::FT, -1, -1, 1, -1, -1>, Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, 1, 0, -1, 1>, Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, 1, 0, -1, 1>, Eigen::Matrix<int, -1, 1, 0, -1, 1>, Eigen::Matrix<int, -1, 1, 0, -1, 1>, Eigen::Matrix<int, -1, -1, 0, -1, -1> >(Eigen::PlainObjectBase<Eigen::Matrix<CGAL::Epeck::FT, -1, -1, 1, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> >&);
-// generated by autoexplicit.sh
-#include <cstdint>
-template size_t igl::copyleft::cgal::extract_cells_single_component<Eigen::Matrix<CGAL::Epeck::FT, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, 1, 0, -1, 1>, Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, 1, 0, -1, 1>, Eigen::Matrix<int, -1, 1, 0, -1, 1>, Eigen::Matrix<int, -1, 1, 0, -1, 1>, Eigen::Matrix<int, -1, -1, 0, -1, -1> >(Eigen::PlainObjectBase<Eigen::Matrix<CGAL::Epeck::FT, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> >&);
-#ifdef WIN32
-template uint64_t igl::copyleft::cgal::extract_cells_single_component<Eigen::Matrix<CGAL::Epeck::FT, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, 1, 0, -1, 1>, Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, 1, 0, -1, 1>, Eigen::Matrix<int, -1, 1, 0, -1, 1>, Eigen::Matrix<int, -1, 1, 0, -1, 1>, Eigen::Matrix<int, -1, -1, 0, -1, -1> >(Eigen::PlainObjectBase<Eigen::Matrix<CGAL::Epeck::FT, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> >&);
-#endif
+template int igl::copyleft::cgal::extract_cells_single_component<Eigen::Matrix<CGAL::Epeck::FT, -1, -1, 1, -1, -1>, Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, 1, 0, -1, 1>, Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, 1, 0, -1, 1>, Eigen::Matrix<int, -1, 1, 0, -1, 1>, Eigen::Matrix<int, -1, -1, 0, -1, -1> >(Eigen::PlainObjectBase<Eigen::Matrix<CGAL::Epeck::FT, -1, -1, 1, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> >&);
+template int igl::copyleft::cgal::extract_cells_single_component<Eigen::Matrix<CGAL::Epeck::FT, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, 1, 0, -1, 1>, Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, 1, 0, -1, 1>, Eigen::Matrix<int, -1, 1, 0, -1, 1>, Eigen::Matrix<int, -1, -1, 0, -1, -1> >(Eigen::PlainObjectBase<Eigen::Matrix<CGAL::Epeck::FT, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> >&);
 #endif

+ 1 - 5
include/igl/copyleft/cgal/extract_cells_single_component.h

@@ -25,9 +25,7 @@ namespace igl {
       /// @param[in] V  #V by 3 array of vertices.
       /// @param[in] F  #F by 3 array of faces.
       /// @param[in] P  #F list of patch indices.
-      /// @param[in] E  #E by 2 array of vertex indices, one edge per row.
       /// @param[in] uE    #uE by 2 list of vertex_indices, represents undirected edges.
-      /// @param[in] EMAP  #F*3 list of indices into uE.
       /// @param[in] uEC  #uE+1 list of cumsums of directed edges sharing each unique edge
       /// @param[in] uEE  #E list of indices into E (see `igl::unique_edge_map`)
       /// @param[out] cells  #P by 2 array of cell indices.  cells(i,0) represents the
@@ -39,16 +37,14 @@ namespace igl {
         typename DerivedF,
         typename DerivedP,
         typename DeriveduE,
-        typename DerivedEMAP,
         typename DeriveduEC,
         typename DeriveduEE,
         typename DerivedC >
-      IGL_INLINE size_t extract_cells_single_component(
+      IGL_INLINE int extract_cells_single_component(
         const Eigen::PlainObjectBase<DerivedV>& V,
         const Eigen::PlainObjectBase<DerivedF>& F,
         const Eigen::PlainObjectBase<DerivedP>& P,
         const Eigen::PlainObjectBase<DeriveduE>& uE,
-        const Eigen::PlainObjectBase<DerivedEMAP>& EMAP,
         const Eigen::PlainObjectBase<DeriveduEC>& uEC,
         const Eigen::PlainObjectBase<DeriveduEE>& uEE,
         Eigen::PlainObjectBase<DerivedC>& cells);

+ 16 - 10
include/igl/copyleft/cgal/extract_feature.cpp

@@ -15,15 +15,15 @@
 template<
   typename DerivedV,
   typename DerivedF,
-  typename DerivedE >
+  typename Derivedfeature_edges >
 IGL_INLINE void igl::copyleft::cgal::extract_feature(
     const Eigen::PlainObjectBase<DerivedV>& V,
     const Eigen::PlainObjectBase<DerivedF>& F,
     const double tol,
-    Eigen::PlainObjectBase<DerivedE>& feature_edges) {
+    Eigen::PlainObjectBase<Derivedfeature_edges>& feature_edges) {
 
-  using IndexType = typename DerivedE::Scalar;
-  DerivedE E, uE;
+  using IndexType = typename Derivedfeature_edges::Scalar;
+  Derivedfeature_edges E, uE;
   Eigen::VectorXi EMAP;
   std::vector<std::vector<IndexType> > uE2E;
   igl::unique_edge_map(F, E, uE, EMAP, uE2E);
@@ -34,20 +34,22 @@ IGL_INLINE void igl::copyleft::cgal::extract_feature(
 template<
   typename DerivedV,
   typename DerivedF,
-  typename DerivedE >
+  typename DeriveduE,
+  typename Derivedfeature_edges
+  >
 IGL_INLINE void igl::copyleft::cgal::extract_feature(
     const Eigen::PlainObjectBase<DerivedV>& V,
     const Eigen::PlainObjectBase<DerivedF>& F,
     const double tol,
-    const Eigen::PlainObjectBase<DerivedE>& E,
-    const Eigen::PlainObjectBase<DerivedE>& uE,
-    const std::vector<std::vector<typename DerivedE::Scalar> >& uE2E,
-    Eigen::PlainObjectBase<DerivedE>& feature_edges) {
+    const Eigen::PlainObjectBase<DeriveduE>& uE,
+    const std::vector<std::vector<typename DeriveduE::Scalar> >& uE2E,
+    Eigen::PlainObjectBase<Derivedfeature_edges>& feature_edges) 
+{
 
   assert(V.cols() == 3);
   assert(F.cols() == 3);
   using Scalar = typename DerivedV::Scalar;
-  using IndexType = typename DerivedE::Scalar;
+  using IndexType = typename DeriveduE::Scalar;
   using Vertex = Eigen::Matrix<Scalar, 3, 1>;
   using Kernel = typename CGAL::Exact_predicates_exact_constructions_kernel;
   using Point = typename Kernel::Point_3;
@@ -122,3 +124,7 @@ IGL_INLINE void igl::copyleft::cgal::extract_feature(
     feature_edges.row(i) = uE.row(result[i]);
   }
 }
+
+#ifdef IGL_STATIC_LIBRARY
+// Explicit template instantiation
+#endif

+ 8 - 8
include/igl/copyleft/cgal/extract_feature.h

@@ -39,29 +39,29 @@ namespace igl
       template <
         typename DerivedV,
         typename DerivedF,
-        typename DerivedE>
+        typename Derivedfeature_edges>
       IGL_INLINE void extract_feature(
             const Eigen::PlainObjectBase<DerivedV>& V,
             const Eigen::PlainObjectBase<DerivedF>& F,
             const double tol,
-            Eigen::PlainObjectBase<DerivedE>& feature_edges);
+            Eigen::PlainObjectBase<Derivedfeature_edges>& feature_edges);
       // \overload
-      // @param[in] E    #E by 2 array of directed edges.
       // @param[in] uE   #uE by 2 array of undirected edges.
       // @param[in] uE2E #uE list of lists mapping undirected edges to all
       //   corresponding directed edges.
       template <
         typename DerivedV,
         typename DerivedF,
-        typename DerivedE>
+        typename DeriveduE,
+        typename Derivedfeature_edges
+        >
       IGL_INLINE void extract_feature(
             const Eigen::PlainObjectBase<DerivedV>& V,
             const Eigen::PlainObjectBase<DerivedF>& F,
             const double tol,
-            const Eigen::PlainObjectBase<DerivedE>& E,
-            const Eigen::PlainObjectBase<DerivedE>& uE,
-            const std::vector<std::vector<typename DerivedE::Scalar> >& uE2E,
-            Eigen::PlainObjectBase<DerivedE>& feature_edges);
+            const Eigen::PlainObjectBase<DeriveduE>& uE,
+            const std::vector<std::vector<typename DeriveduE::Scalar> >& uE2E,
+            Eigen::PlainObjectBase<Derivedfeature_edges>& feature_edges);
     }
   }
 }

+ 0 - 2
include/igl/copyleft/cgal/fast_winding_number.cpp

@@ -21,8 +21,6 @@ IGL_INLINE void igl::copyleft::cgal::fast_winding_number(
   Eigen::PlainObjectBase<DerivedWN>& WN)
 {
   typedef typename DerivedWN::Scalar real;
-  typedef typename Eigen::Matrix<real,Eigen::Dynamic,Eigen::Dynamic>
-    RealMatrix;
         
   std::vector<std::vector<int> > point_indices;
   Eigen::Matrix<int,Eigen::Dynamic,8> CH;

+ 0 - 1
include/igl/copyleft/cgal/half_space_box.cpp

@@ -10,7 +10,6 @@ IGL_INLINE void igl::copyleft::cgal::half_space_box(
   Eigen::Matrix<CGAL::Epeck::FT,8,3> & BV,
   Eigen::Matrix<int,12,3> & BF)
 {
-  typedef CGAL::Plane_3<CGAL::Epeck> Plane;
   typedef CGAL::Point_3<CGAL::Epeck> Point;
   typedef CGAL::Vector_3<CGAL::Epeck> Vector;
   typedef CGAL::Epeck::FT EScalar;

+ 6 - 33
include/igl/copyleft/cgal/intersect_other.cpp

@@ -23,33 +23,23 @@ namespace igl
   {
     namespace cgal
     {
-      template <typename DerivedF>
+      template <typename Index>
       static IGL_INLINE void push_result(
-        const Eigen::PlainObjectBase<DerivedF> & F,
         const int f,
         const int f_other,
         const CGAL::Object & result,
         std::map<
-          typename DerivedF::Index,
-          std::vector<std::pair<typename DerivedF::Index, CGAL::Object> > > &
+          Index,
+          std::vector<std::pair<Index, CGAL::Object> > > &
           offending)
         //std::map<
         //  std::pair<typename DerivedF::Index,typename DerivedF::Index>,
         //  std::vector<typename DerivedF::Index> > & edge2faces)
       {
-        typedef typename DerivedF::Index Index;
-        typedef std::pair<Index,Index> EMK;
         if(offending.count(f) == 0)
         {
           // first time marking, initialize with new id and empty list
           offending[f] = {};
-          for(Index e = 0; e<3;e++)
-          {
-            // append face to edge's list
-            Index i = F(f,(e+1)%3) < F(f,(e+2)%3) ? F(f,(e+1)%3) : F(f,(e+2)%3);
-            Index j = F(f,(e+1)%3) < F(f,(e+2)%3) ? F(f,(e+2)%3) : F(f,(e+1)%3);
-            //edge2faces[EMK(i,j)].push_back(f);
-          }
         }
         offending[f].push_back({f_other,result});
       }
@@ -81,33 +71,16 @@ namespace igl
         using namespace Eigen;
 
         typedef typename DerivedFA::Index Index;
-        // 3D Primitives
-        typedef CGAL::Point_3<Kernel>    Point_3;
-        typedef CGAL::Segment_3<Kernel>  Segment_3; 
         typedef CGAL::Triangle_3<Kernel> Triangle_3; 
-        typedef CGAL::Plane_3<Kernel>    Plane_3;
-        typedef CGAL::Tetrahedron_3<Kernel> Tetrahedron_3; 
-        // 2D Primitives
-        typedef CGAL::Point_2<Kernel>    Point_2;
-        typedef CGAL::Segment_2<Kernel>  Segment_2; 
-        typedef CGAL::Triangle_2<Kernel> Triangle_2; 
-        // 2D Constrained Delaunay Triangulation types
-        typedef CGAL::Triangulation_vertex_base_2<Kernel>  TVB_2;
-        typedef CGAL::Constrained_triangulation_face_base_2<Kernel> CTAB_2;
-        typedef CGAL::Triangulation_data_structure_2<TVB_2,CTAB_2> TDS_2;
-        typedef CGAL::Exact_intersections_tag Itag;
-        // Axis-align boxes for all-pairs self-intersection detection
+        //// Axis-align boxes for all-pairs self-intersection detection
         typedef std::vector<Triangle_3> Triangles;
         typedef typename Triangles::iterator TrianglesIterator;
-        typedef typename Triangles::const_iterator TrianglesConstIterator;
         typedef 
           CGAL::Box_intersection_d::Box_with_handle_d<double,3,TrianglesIterator> 
           Box;
         typedef 
           std::map<Index,std::vector<std::pair<Index,CGAL::Object> > > 
           OffendingMap;
-        typedef std::map<std::pair<Index,Index>,std::vector<Index> >  EdgeMap;
-        typedef std::pair<Index,Index> EMK;
 
         Triangles TA,TB;
         // Compute and process self intersections
@@ -154,8 +127,8 @@ namespace igl
             {
               CGAL::Object result = CGAL::intersection(A,B);
 
-              push_result(FA,fa,fb,result,offendingA);
-              push_result(FB,fb,fa,result,offendingB);
+              push_result(fa,fb,result,offendingA);
+              push_result(fb,fa,result,offendingB);
             }
           }
         };

+ 1 - 3
include/igl/copyleft/cgal/mesh_boolean.cpp

@@ -202,10 +202,8 @@ IGL_INLINE bool igl::copyleft::cgal::mesh_boolean(
   };
   tictoc();
 #endif
-  typedef typename DerivedVC::Scalar Scalar;
   typedef CGAL::Epeck Kernel;
   typedef Kernel::FT ExactScalar;
-  typedef Eigen::Matrix<Scalar,Eigen::Dynamic,3> MatrixX3S;
   typedef Eigen::Matrix<typename DerivedJ::Scalar,Eigen::Dynamic,1> VectorXJ;
   typedef Eigen::Matrix<
     ExactScalar,
@@ -250,7 +248,7 @@ IGL_INLINE bool igl::copyleft::cgal::mesh_boolean(
   // Compute cells (V,F,P,E,uE,EMAP) -> (per_patch_cells)
   Eigen::MatrixXi per_patch_cells;
   const size_t num_cells =
-  extract_cells( V, F, P, E, uE, EMAP, uEC, uEE, per_patch_cells);
+  extract_cells( V, F, P, uE, EMAP, uEC, uEE, per_patch_cells);
 #ifdef MESH_BOOLEAN_TIMING
   log_time("cell_extraction");
 #endif

+ 0 - 3
include/igl/copyleft/cgal/point_areas.cpp

@@ -49,12 +49,9 @@ namespace igl {
         typedef typename DerivedN::Scalar scalarN;
         typedef typename DerivedA::Scalar scalarA;
         typedef Eigen::Matrix<real,1,3> RowVec3;
-        typedef Eigen::Matrix<real,1,2> RowVec2;
         
         typedef Eigen::Matrix<real, Eigen::Dynamic, Eigen::Dynamic> MatrixP;
         typedef Eigen::Matrix<scalarN, Eigen::Dynamic, Eigen::Dynamic> MatrixN;
-        typedef Eigen::Matrix<typename DerivedN::Scalar,
-                  Eigen::Dynamic, Eigen::Dynamic> VecotorO;
         typedef Eigen::Matrix<typename DerivedI::Scalar,
                   Eigen::Dynamic, Eigen::Dynamic> MatrixI;
         

+ 0 - 5
include/igl/copyleft/cgal/point_mesh_squared_distance.cpp

@@ -52,12 +52,7 @@ IGL_INLINE void igl::copyleft::cgal::point_mesh_squared_distance_precompute(
 {
   using namespace std;
 
-  typedef CGAL::Triangle_3<Kernel> Triangle_3; 
   typedef CGAL::Point_3<Kernel> Point_3; 
-  typedef typename std::vector<Triangle_3>::iterator Iterator;
-  typedef CGAL::AABB_triangle_primitive<Kernel, Iterator> Primitive;
-  typedef CGAL::AABB_traits<Kernel, Primitive> AABB_triangle_traits;
-  typedef CGAL::AABB_tree<AABB_triangle_traits> Tree;
 
   // Must be 3D
   assert(V.cols() == 3);

+ 0 - 2
include/igl/copyleft/cgal/points_inside_component.cpp

@@ -173,7 +173,6 @@ namespace igl {
                 auto is_on_exterior = [&](const Plane_3& separator) -> bool{
                     size_t positive=0;
                     size_t negative=0;
-                    size_t coplanar=0;
                     for (const auto& point : adj_points) {
                         switch(separator.oriented_side(point)) {
                             case CGAL::ON_POSITIVE_SIDE:
@@ -183,7 +182,6 @@ namespace igl {
                                 negative++;
                                 break;
                             case CGAL::ON_ORIENTED_BOUNDARY:
-                                coplanar++;
                                 break;
                             default:
                                 throw "Unknown plane-point orientation";

+ 1 - 2
include/igl/copyleft/cgal/projected_delaunay.cpp

@@ -6,7 +6,6 @@
 // v. 2.0. If a copy of the MPL was not distributed with this file, You can 
 // obtain one at http://mozilla.org/MPL/2.0/.
 #include "projected_delaunay.h"
-#include "../../REDRUM.h"
 #include <iostream>
 #include <cassert>
 
@@ -93,7 +92,7 @@ IGL_INLINE void igl::copyleft::cgal::projected_delaunay(
       }
     }else
     {
-      cerr<<REDRUM("What is this object?!")<<endl;
+      cerr<<"What is this object?!"<<endl;
       assert(false);
     }
   }

+ 15 - 11
include/igl/copyleft/cgal/propagate_winding_numbers.cpp

@@ -64,7 +64,7 @@ IGL_INLINE bool igl::copyleft::cgal::propagate_winding_numbers(
 
   DerivedW per_patch_cells;
   const size_t num_cells =
-    extract_cells(V,F,P,E,uE,EMAP,uEC,uEE,per_patch_cells);
+    extract_cells(V,F,P,uE,EMAP,uEC,uEE,per_patch_cells);
 #ifdef PROPAGATE_WINDING_NUMBER_TIMING
   log_time("cell_extraction");
 #endif
@@ -132,6 +132,7 @@ IGL_INLINE bool igl::copyleft::cgal::propagate_winding_numbers(
   log_time("cell_connectivity");
 #endif
 
+#ifndef NDEBUG
   auto save_cell = [&](const std::string& filename, size_t cell_id) -> void{
     std::vector<size_t> faces;
     for (size_t i=0; i<num_patches; i++) {
@@ -151,6 +152,7 @@ IGL_INLINE bool igl::copyleft::cgal::propagate_winding_numbers(
     assign(V,vertices);
     writePLY(filename, vertices, cell_faces);
   };
+#endif
 
 #ifndef NDEBUG
   {
@@ -272,16 +274,18 @@ IGL_INLINE bool igl::copyleft::cgal::propagate_winding_numbers(
         // is local and embedded within the volume.  This, unfortunately, is the
         // best we can do because the problem of computing integer winding
         // number is ill-defined for open and non-orientable surfaces.
-        for (size_t i=0; i<num_labels; i++) {
-          if ((int)i == patch_labels[patch_idx]) {
-            int inc = direction ? -1:1;
-            //assert(per_cell_W(neighbor_cell, i) ==
-            //    per_cell_W(curr_cell, i) + inc);
-          } else {
-            //assert(per_cell_W(neighbor_cell, i) ==
-            //    per_cell_W(curr_cell, i));
-          }
-        }
+        //
+        // Commented this out because it wasn't actually calling the asserts...
+        //for (size_t i=0; i<num_labels; i++) {
+        //  if ((int)i == patch_labels[patch_idx]) {
+        //    int inc = direction ? -1:1;
+        //    //assert(per_cell_W(neighbor_cell, i) ==
+        //    //    per_cell_W(curr_cell, i) + inc);
+        //  } else {
+        //    //assert(per_cell_W(neighbor_cell, i) ==
+        //    //    per_cell_W(curr_cell, i));
+        //  }
+        //}
 #endif
       }
     }

+ 0 - 1
include/igl/copyleft/cgal/relabel_small_immersed_cells.cpp

@@ -31,7 +31,6 @@ IGL_INLINE void igl::copyleft::cgal::relabel_small_immersed_cells(
     const FT vol_threashold,
     Eigen::PlainObjectBase<DerivedW>& W)
 {
-  const size_t num_vertices = V.rows();
   const size_t num_faces = F.rows();
   typedef std::tuple<typename DerivedC::Scalar, bool, size_t> CellConnection;
   std::vector<std::set<CellConnection> > cell_adj;

+ 1 - 8
include/igl/copyleft/cgal/remesh_intersections.cpp

@@ -28,7 +28,7 @@
 // Helper function to invoke .exact() on CGAL::Epeck::FT and no-op on others
 template <typename T> inline void exact(T & v);
 template <> inline void exact(CGAL::Epeck::FT & v) { v = v.exact(); }
-template <typename T> inline void exact(T & v){}
+template <typename T> inline void exact(T & /* v */ ){}
 
 template <
   typename DerivedV,
@@ -72,13 +72,6 @@ IGL_INLINE void igl::copyleft::cgal::remesh_intersections(
     typedef CGAL::Point_3<Kernel>    Point_3;
     typedef CGAL::Segment_3<Kernel>  Segment_3; 
     typedef CGAL::Plane_3<Kernel>    Plane_3;
-    typedef CGAL::Triangulation_vertex_base_2<Kernel>  TVB_2;
-    typedef CGAL::Constrained_triangulation_face_base_2<Kernel> CTFB_2;
-    typedef CGAL::Triangulation_data_structure_2<TVB_2,CTFB_2> TDS_2;
-    typedef CGAL::Exact_intersections_tag Itag;
-    typedef CGAL::Constrained_Delaunay_triangulation_2<Kernel,TDS_2,Itag> 
-        CDT_2;
-    typedef CGAL::Constrained_triangulation_plus_2<CDT_2> CDT_plus_2;
 
     typedef typename DerivedF::Index Index;
     typedef std::pair<Index, Index> Edge;

+ 0 - 2
include/igl/copyleft/cgal/segment_segment_squared_distance.cpp

@@ -17,9 +17,7 @@ IGL_INLINE bool igl::copyleft::cgal::segment_segment_squared_distance(
     CGAL::Point_3<Kernel> & P2,
     typename Kernel::FT & dst)
 {
-  typedef CGAL::Point_3<Kernel> Point_3;
   typedef CGAL::Vector_3<Kernel> Vector_3;
-  typedef typename Kernel::FT EScalar;
   if(S1.is_degenerate())
   {
     // All points on S1 are the same

+ 0 - 3
include/igl/copyleft/cgal/subdivide_segments.cpp

@@ -40,7 +40,6 @@ IGL_INLINE void igl::copyleft::cgal::subdivide_segments(
   // Exact scalar type
   typedef Kernel K;
   typedef typename Kernel::FT EScalar;
-  typedef CGAL::Segment_2<Kernel> Segment_2;
   typedef CGAL::Point_2<Kernel> Point_2;
   typedef Matrix<EScalar,Dynamic,Dynamic>  MatrixXE;
 
@@ -63,8 +62,6 @@ IGL_INLINE void igl::copyleft::cgal::subdivide_segments(
   const int m = E.rows();
   // now steiner contains lists of points (unsorted) for each edge. Sort them
   // and count total number of vertices and edges
-  int ni = 0;
-  int mi = 0;
   // new steiner points
   std::vector<Point_2> S;
   std::vector<std::vector<typename DerivedE::Scalar> > vEI;

+ 0 - 1
include/igl/copyleft/cgal/triangle_triangle_squared_distance.cpp

@@ -20,7 +20,6 @@ IGL_INLINE bool igl::copyleft::cgal::triangle_triangle_squared_distance(
   typename Kernel::FT & d)
 {
   typedef CGAL::Point_3<Kernel> Point_3;
-  typedef CGAL::Vector_3<Kernel> Vector_3;
   typedef CGAL::Triangle_3<Kernel> Triangle_3;
   typedef CGAL::Segment_3<Kernel> Segment_3;
   typedef typename Kernel::FT EScalar;

+ 0 - 4
include/igl/copyleft/cgal/triangulate.cpp

@@ -2,8 +2,6 @@
 #include "assign_scalar.h"
 #include "../../list_to_matrix.h"
 #include <CGAL/Point_2.h>
-#include <CGAL/Segment_2.h>
-#include <CGAL/Triangle_2.h>
 #include <CGAL/Constrained_Delaunay_triangulation_2.h>
 #include <CGAL/Constrained_triangulation_plus_2.h>
 #include <CGAL/Triangulation_face_base_with_info_2.h>
@@ -35,8 +33,6 @@ IGL_INLINE void igl::copyleft::cgal::triangulate(
   typedef Eigen::Index Index;
   //typedef CGAL::Epeck Kernel;
   typedef CGAL::Point_2<Kernel>    Point_2;
-  typedef CGAL::Segment_2<Kernel>  Segment_2;
-  typedef CGAL::Triangle_2<Kernel> Triangle_2;
   typedef CGAL::Triangulation_vertex_base_2<Kernel>  TVB_2;
   typedef CGAL::Triangulation_face_base_with_info_2<FaceInfo2,Kernel>    TFB_2;
   typedef CGAL::Constrained_triangulation_face_base_2<Kernel,TFB_2> CTFB_2;

+ 0 - 1
include/igl/copyleft/cgal/trim_with_solid.cpp

@@ -41,7 +41,6 @@ IGL_INLINE void igl::copyleft::cgal::trim_with_solid(
   // resolve intersections using exact representation
   typedef Eigen::Matrix<CGAL::Epeck::FT,Eigen::Dynamic,3> MatrixX3E;
   typedef Eigen::Matrix<CGAL::Epeck::FT,Eigen::Dynamic,1> VectorXE;
-  typedef Eigen::Matrix<CGAL::Epeck::FT,1,3> RowVector3E;
   MatrixX3E V;
   Eigen::MatrixXi _1;
   Eigen::VectorXi _2;

+ 12 - 12
include/igl/copyleft/cgal/wire_mesh.cpp

@@ -55,17 +55,17 @@ IGL_INLINE void igl::copyleft::cgal::wire_mesh(
   {
     return WV.rows() + e*2*PV.rows() + PV.rows()*c + p;
   };
-  const auto unindex = 
-    [&PV,&WV](int v, int & e, int & c, int & p)
-  {
-    assert(v>=WV.rows());
-    v = v-WV.rows();
-    e = v/(2*PV.rows());
-    v = v-e*(2*PV.rows());
-    c = v/(PV.rows());
-    v = v-c*(PV.rows());
-    p = v;
-  };
+  //const auto unindex = 
+  //  [&PV,&WV](int v, int & e, int & c, int & p)
+  //{
+  //  assert(v>=WV.rows());
+  //  v = v-WV.rows();
+  //  e = v/(2*PV.rows());
+  //  v = v-e*(2*PV.rows());
+  //  c = v/(PV.rows());
+  //  v = v-c*(PV.rows());
+  //  p = v;
+  //};
 
   // Count each vertex's indicident edges.
   std::vector<int> nedges(WV.rows(), 0);
@@ -114,7 +114,7 @@ IGL_INLINE void igl::copyleft::cgal::wire_mesh(
   std::vector<std::vector<typename DerivedF::Index> > vF;
   std::vector<int> vJ;
   const auto append_hull = 
-    [&V,&vF,&vJ,&unindex,&WV](const Eigen::VectorXi & I, const int j)
+    [&V,&vF,&vJ](const Eigen::VectorXi & I, const int j)
   {
     MatrixX3S Vv;
     igl::slice(V,I,1,Vv);

+ 17 - 13
include/igl/copyleft/quadprog.cpp

@@ -97,19 +97,21 @@ IGL_INLINE bool igl::copyleft::quadprog(
   typedef double Scalar;
 
 
-  const auto print_ivector= [](const char* name, const Eigen::MatrixXi & A, int n)
+#ifdef TRACE_SOLVER
+  const auto print_ivector= [](const char* name, const Eigen::MatrixXi & A, int /*n*/)
   {
     std::cout<<igl::matlab_format(A,name)<<std::endl;
   };
-  const auto print_matrix = [](const char* name, const Eigen::MatrixXd & A, int n)
+  const auto print_matrix = [](const char* name, const Eigen::MatrixXd & A, int /*n*/)
   {
     std::cout<<igl::matlab_format(A,name)<<std::endl;
   };
 
-  const auto print_vector = [](const char* name, const Eigen::VectorXd & v, int n)
+  const auto print_vector = [](const char* name, const Eigen::VectorXd & v, int /*n*/)
   {
     std::cout<<igl::matlab_format(v,name)<<std::endl;
   };
+#endif
 
   const auto distance = [](Scalar a, Scalar b)->Scalar
   {
@@ -232,7 +234,7 @@ IGL_INLINE bool igl::copyleft::quadprog(
 #ifdef TRACE_SOLVER
     std::cerr << "Delete constraint " << l << ' ' << iq;
 #endif
-    int i, j, k, qq;
+    int i, j, k, qq = -1;
     double cc, ss, h, xny, t1, t2;
 
     /* Find the index qq for active constraint l to be removed */
@@ -312,18 +314,19 @@ IGL_INLINE bool igl::copyleft::quadprog(
  
   VectorXd s(m+p), z(n), r(m + p), d(n),  np(n), u(m + p);
   VectorXd x_old(n), u_old(m + p);
-  double f_value, psi, c1, c2, sum, ss, R_norm;
+#ifdef TRACE_SOLVER
+  double f_value;
+#endif
+  double psi, c1, c2, sum, ss, R_norm;
   const double inf = std::numeric_limits<double>::infinity();
   double t, t1, t2; /* t is the step length, which is the minimum of the partial step length t1 
     * and the full step length t2 */
   VectorXi A(m + p), A_old(m + p), iai(m + p);
-  int q;
-  int iq, iter = 0;
+  int iq; 
   std::vector<bool> iaexcl(m + p);
  	
   me = p; /* number of equality constraints */
   mi = m; /* number of inequality constraints */
-  q = 0;  /* size of the active set A (containing the indices of the active constraints) */
   
   /*
    * Preprocessing phase
@@ -359,8 +362,8 @@ IGL_INLINE bool igl::copyleft::quadprog(
   x = chol.solve(g0);
   x = -x;
 	/* and compute the current solution value */ 
-	f_value = 0.5 * g0.dot(x);
 #ifdef TRACE_SOLVER
+	f_value = 0.5 * g0.dot(x);
   std::cerr << "Unconstrained solution: " << f_value << std::endl;
   print_vector("x", x, n);
 #endif
@@ -393,7 +396,9 @@ IGL_INLINE bool igl::copyleft::quadprog(
     u.head(iq) -= t2 * r.head(iq);
     
     /* compute the new solution value */
+#ifdef TRACE_SOLVER
     f_value += 0.5 * (t2 * t2) * z.dot(np);
+#endif
     A(i) = -i - 1;
     
     if (!add_constraint(R, J, d, iq, R_norm))
@@ -408,7 +413,7 @@ IGL_INLINE bool igl::copyleft::quadprog(
 	for (i = 0; i < mi; i++)
 		iai(i) = i;
   
-l1:	iter++;
+l1:	
 #ifdef TRACE_SOLVER
   print_vector("x", x, n);
 #endif
@@ -438,7 +443,6 @@ l1:	iter++;
 	if (std::abs(psi) <= mi * std::numeric_limits<double>::epsilon() * c1 * c2* 100.0)
 	{
     /* numerically there are not infeasibilities anymore */
-    q = iq;
 		return true;
   }
     
@@ -458,7 +462,6 @@ l2: /* Step 2: check for feasibility and determine a new S-pair */
 	}
   if (ss >= 0.0)
   {
-    q = iq;
     return true;
   }
     
@@ -522,7 +525,6 @@ l2a:/* Step 2a: determine step direction */
   {
     /* QPP is infeasible */
     // FIXME: unbounded to raise
-    q = iq;
     return false;
   }
   /* case (ii): step in dual space */
@@ -547,7 +549,9 @@ l2a:/* Step 2a: determine step direction */
   
   x += t * z;
   /* update the solution value */
+#ifdef TRACE_SOLVER
   f_value += t * z.dot(np) * (0.5 * t + u(iq));
+#endif
   
   u.head(iq) -= t * r.head(iq);
   u(iq) += t;

+ 1 - 1
include/igl/copyleft/tetgen/cdt.h

@@ -14,7 +14,7 @@
 #ifndef TETLIBRARY
 #  define TETLIBRARY 
 #endif
-#include "tetgen.h" // Defined REAL
+#include <tetgen.h> // Defined REAL
 
 namespace igl
 {

+ 2 - 1
include/igl/cotmatrix_intrinsic.cpp

@@ -7,6 +7,7 @@
 // obtain one at http://mozilla.org/MPL/2.0/.
 #include "cotmatrix_intrinsic.h"
 #include "cotmatrix_entries.h"
+#include "IGL_ASSERT.h"
 #include <iostream>
 
 template <typename Derivedl, typename DerivedF, typename Scalar>
@@ -24,7 +25,7 @@ IGL_INLINE void igl::cotmatrix_intrinsic(
   Matrix<int,Dynamic,2> edges;
   int simplex_size = F.cols();
   // 3 for triangles, 4 for tets
-  assert(simplex_size == 3);
+  IGL_ASSERT(simplex_size == 3);
   // This is important! it could decrease the comptuation time by a factor of 2
   // Laplacian for a closed 2d manifold mesh will have on average 7 entries per
   // row

+ 18 - 40
include/igl/cr_vector_mass.cpp

@@ -15,76 +15,55 @@
 #include "squared_edge_lengths.h"
 
 
-template <typename DerivedV, typename DerivedF, typename DerivedE,
-typename DerivedOE, typename ScalarM>
+template <typename DerivedV, typename DerivedF, typename DerivedE, typename ScalarM>
 IGL_INLINE void
 igl::cr_vector_mass(
   const Eigen::MatrixBase<DerivedV>& V,
   const Eigen::MatrixBase<DerivedF>& F,
   const Eigen::MatrixBase<DerivedE>& E,
-  const Eigen::MatrixBase<DerivedOE>& oE,
   Eigen::SparseMatrix<ScalarM>& M)
 {
   Eigen::Matrix<typename DerivedV::Scalar, Eigen::Dynamic, Eigen::Dynamic>
-  l_sq;
-  squared_edge_lengths(V, F, l_sq);
-  cr_vector_mass_intrinsic(F, l_sq, E, oE, M);
+  dblA;
+  doublearea(V,F,dblA);
+  cr_vector_mass_intrinsic(F, dblA, E, M);
 }
 
 
-template <typename DerivedV, typename DerivedF, typename DerivedE,
-typename DerivedOE, typename ScalarM>
+template <
+  typename DerivedV, 
+  typename DerivedF, 
+  typename DerivedE, 
+  typename ScalarM>
 IGL_INLINE void
 igl::cr_vector_mass(
   const Eigen::MatrixBase<DerivedV>& V,
   const Eigen::MatrixBase<DerivedF>& F,
   Eigen::PlainObjectBase<DerivedE>& E,
-  Eigen::PlainObjectBase<DerivedOE>& oE,
   Eigen::SparseMatrix<ScalarM>& M)
 {
-  if(E.rows()!=F.rows() || E.cols()!=F.cols() || oE.rows()!=F.rows() ||
-   oE.cols()!=F.cols()) {
+  if(E.rows()!=F.rows() || E.cols()!=F.cols())
+  {
+    DerivedE oE;
     orient_halfedges(F, E, oE);
   }
 
   const Eigen::PlainObjectBase<DerivedE>& cE = E;
-  const Eigen::PlainObjectBase<DerivedOE>& coE = oE;
-  cr_vector_mass(V, F, cE, coE, M);
+  cr_vector_mass(V, F, cE, M);
 }
 
 
-template <typename DerivedF, typename DerivedL_sq, typename DerivedE,
-typename DerivedOE, typename ScalarM>
-IGL_INLINE void
-igl::cr_vector_mass_intrinsic(
-  const Eigen::MatrixBase<DerivedF>& F,
-  const Eigen::MatrixBase<DerivedL_sq>& l_sq,
-  const Eigen::MatrixBase<DerivedE>& E,
-  const Eigen::MatrixBase<DerivedOE>& oE,
-  Eigen::SparseMatrix<ScalarM>& M)
-{
-  Eigen::Matrix<typename DerivedL_sq::Scalar, Eigen::Dynamic, Eigen::Dynamic>
-  dA;
-  DerivedL_sq l_sqrt = l_sq.array().sqrt().matrix();
-  doublearea(l_sqrt, dA);
-  cr_vector_mass_intrinsic(F, l_sq, dA, E, oE, M);
-}
-
-
-template <typename DerivedF, typename DerivedL_sq, typename DeriveddA,
-typename DerivedE, typename DerivedOE, typename ScalarM>
+template <typename DerivedF, typename DeriveddA,
+typename DerivedE, typename ScalarM>
 IGL_INLINE void
 igl::cr_vector_mass_intrinsic(
  const Eigen::MatrixBase<DerivedF>& F,
- const Eigen::MatrixBase<DerivedL_sq>& l_sq,
  const Eigen::MatrixBase<DeriveddA>& dA,
  const Eigen::MatrixBase<DerivedE>& E,
- const Eigen::MatrixBase<DerivedOE>& oE,
  Eigen::SparseMatrix<ScalarM>& M)
 {
   assert(F.cols()==3 && "Faces have three vertices");
-  assert(E.rows()==F.rows() && E.cols()==F.cols() && oE.rows()==F.rows() &&
-   oE.cols()==F.cols() && "Wrong dimension in edge vectors");
+  assert(E.rows()==F.rows() && E.cols()==F.cols() && "Wrong dimension in edge vectors");
 
   const Eigen::Index m = F.rows();
   const typename DerivedE::Scalar nE = E.maxCoeff() + 1;
@@ -93,7 +72,6 @@ igl::cr_vector_mass_intrinsic(
   tripletList.reserve(2*3*m);
   for(Eigen::Index f=0; f<m; ++f) {
     for(int e=0; e<3; ++e) {
-      const typename DerivedF::Scalar v1=F(f,(e+1)%3), v2=F(f,(e+2)%3);
       //Scaled
       const ScalarM entry = dA(f) / 6;
       tripletList.emplace_back(E(f,e), E(f,e), entry);
@@ -107,6 +85,6 @@ igl::cr_vector_mass_intrinsic(
 
 #ifdef IGL_STATIC_LIBRARY
 // Explicit template instantiation
-template void igl::cr_vector_mass<Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, -1, 0, -1, -1>, double>(Eigen::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> >&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> >&, Eigen::SparseMatrix<double, 0, int>&);
-template void igl::cr_vector_mass_intrinsic<Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, -1, 0, -1, -1>, double>(Eigen::MatrixBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::SparseMatrix<double, 0, int>&);
+// generated by autoexplicit.sh
+template void igl::cr_vector_mass<Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, -1, 0, -1, -1>, double>(Eigen::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1>> const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, -1, 0, -1, -1>> const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1>>&, Eigen::SparseMatrix<double, 0, int>&);
 #endif

+ 5 - 24
include/igl/cr_vector_mass.h

@@ -24,58 +24,39 @@ namespace igl
   ///  @param[in] V #V by 3 list of mesh vertex positions
   ///  @param[in] F #F by 3 list of mesh face indices into rows of V
   ///  @param[in] E #F by 3 a mapping from each halfedge to each edge
-  ///  @param[in] oE #F by 3 the orientation (e.g., -1 or 1) of each halfedge
-  ///    compared to the orientation of the actual edge, as computed with
-  ///    orient_halfedges. will be computed if not provided.
   ///  @param[out] L 2*|HE| by 2*|HE| computed Mass matrix
   template <typename DerivedV, typename DerivedF, typename DerivedE,
-  typename DerivedOE, typename ScalarM>
+  typename ScalarM>
   IGL_INLINE void
   cr_vector_mass(
     const Eigen::MatrixBase<DerivedV>& V,
     const Eigen::MatrixBase<DerivedF>& F,
     const Eigen::MatrixBase<DerivedE>& E,
-    const Eigen::MatrixBase<DerivedOE>& oE,
     Eigen::SparseMatrix<ScalarM>& M);
   /// \overload
   ///
-  /// \brief `E` and `oE` are computed and output.
+  /// \brief `E` are (possibly?) computed and output.
   template <typename DerivedV, typename DerivedF, typename DerivedE,
-  typename DerivedOE, typename ScalarM>
+  typename ScalarM>
   IGL_INLINE void
   cr_vector_mass(
     const Eigen::MatrixBase<DerivedV>& V,
     const Eigen::MatrixBase<DerivedF>& F,
     Eigen::PlainObjectBase<DerivedE>& E,
-    Eigen::PlainObjectBase<DerivedOE>& oE,
     Eigen::SparseMatrix<ScalarM>& M);
   /// \overload
   /// \brief intrinsic version.
   ///
-  ///  @param[in] l_sq #F by 3 list of squared edge lengths of each halfedge
   ///  @param[in] dA #F list of double areas
   ///
   ///  \fileinfo
-  template <typename DerivedF, typename DerivedL_sq, typename DeriveddA,
-  typename DerivedE, typename DerivedOE, typename ScalarM>
+  template <typename DerivedF, typename DeriveddA,
+  typename DerivedE, typename ScalarM>
   IGL_INLINE void
   cr_vector_mass_intrinsic(
     const Eigen::MatrixBase<DerivedF>& F,
-    const Eigen::MatrixBase<DerivedL_sq>& l_sq,
     const Eigen::MatrixBase<DeriveddA>& dA,
     const Eigen::MatrixBase<DerivedE>& E,
-    const Eigen::MatrixBase<DerivedOE>& oE,
-    Eigen::SparseMatrix<ScalarM>& M);
-  /// \overload
-  /// \fileinfo
-  template <typename DerivedF, typename DerivedL_sq, typename DerivedE,
-  typename DerivedOE, typename ScalarM>
-  IGL_INLINE void
-  cr_vector_mass_intrinsic(
-    const Eigen::MatrixBase<DerivedF>& F,
-    const Eigen::MatrixBase<DerivedL_sq>& l_sq,
-    const Eigen::MatrixBase<DerivedE>& E,
-    const Eigen::MatrixBase<DerivedOE>& oE,
     Eigen::SparseMatrix<ScalarM>& M);
 
 }

+ 0 - 1
include/igl/cross_field_mismatch.cpp

@@ -47,7 +47,6 @@ namespace igl {
     inline int mismatchByCross(const int f0,
                                const int f1)
     {
-      Eigen::Matrix<typename DerivedV::Scalar, 3, 1> dir0 = PD1.row(f0);
       Eigen::Matrix<typename DerivedV::Scalar, 3, 1> dir1 = PD1.row(f1);
       Eigen::Matrix<typename DerivedV::Scalar, 3, 1> n0 = N.row(f0);
       Eigen::Matrix<typename DerivedV::Scalar, 3, 1> n1 = N.row(f1);

+ 1 - 1
include/igl/curved_hessian_energy.cpp

@@ -98,7 +98,7 @@ igl::curved_hessian_energy_intrinsic(
 {
   //Matrices that need to be combined
   Eigen::SparseMatrix<ScalarQ> M, D, L, K;
-  cr_vector_mass_intrinsic(F, l_sq, dA,  E, oE, M);
+  cr_vector_mass_intrinsic(F, dA,  E, M);
   scalar_to_cr_vector_gradient_intrinsic(F, l_sq, dA, E, oE, D);
   cr_vector_laplacian_intrinsic(F, l_sq, dA, E, oE, L);
   cr_vector_curvature_correction_intrinsic(F, l_sq, E, oE, K);

+ 0 - 1
include/igl/cut_mesh.cpp

@@ -47,7 +47,6 @@ IGL_INLINE void igl::cut_mesh(
   const Eigen::MatrixBase<DerivedC>& C,
   Eigen::PlainObjectBase<DerivedI>& I
 ){
-  typedef typename DerivedF::Scalar Index;
   DerivedF FF, FFi;
   igl::triangle_triangle_adjacency(F,FF,FFi);
   igl::cut_mesh(V,F,FF,FFi,C,I);

+ 0 - 2
include/igl/cut_mesh_from_singularities.cpp

@@ -156,12 +156,10 @@ namespace igl {
       F_visited.setConstant(F.rows(),0);
       Handle_Seams.setConstant(F.rows(),3,1);
 
-      int index=0;
       for (unsigned f = 0; f<F.rows(); f++)
       {
         if (!F_visited(f))
         {
-          index++;
           FloodFill(f, Handle_Seams);
         }
       }

+ 5 - 4
include/igl/decimate.cpp

@@ -137,10 +137,10 @@ IGL_INLINE bool igl::decimate(
   const decimate_stopping_condition_callback & stopping_condition,
   const decimate_pre_collapse_callback       & pre_collapse,
   const decimate_post_collapse_callback      & post_collapse,
-  const Eigen::MatrixXi & OE,
-  const Eigen::VectorXi & OEMAP,
-  const Eigen::MatrixXi & OEF,
-  const Eigen::MatrixXi & OEI,
+  const Eigen::MatrixXi & /*OE*/,
+  const Eigen::VectorXi & /*OEMAP*/,
+  const Eigen::MatrixXi & /*OEF*/,
+  const Eigen::MatrixXi & /*OEI*/,
   Eigen::MatrixXd & U,
   Eigen::MatrixXi & G,
   Eigen::VectorXi & J,
@@ -153,6 +153,7 @@ IGL_INLINE bool igl::decimate(
   // Working copies
   Eigen::MatrixXd V = OV;
   Eigen::MatrixXi F = OF;
+  // Why recompute this rather than copy input?
   VectorXi EMAP;
   MatrixXi E,EF,EI;
   edge_flaps(F,E,EMAP,EF,EI);

+ 3 - 0
include/igl/decimate.h

@@ -141,6 +141,9 @@ namespace igl
   /// @return true if m was reached (otherwise #G > m)
   ///
   /// \see connect_boundary_to_infinity
+  ///
+  /// \bug E,EMAP,EF,EI seem to be immediately (re)computed from F. These inputs
+  /// are unused and it's not clear why.
   IGL_INLINE bool decimate(
     const Eigen::MatrixXd & V,
     const Eigen::MatrixXi & F,

+ 0 - 1
include/igl/delaunay_triangulation.cpp

@@ -28,7 +28,6 @@ IGL_INLINE void igl::delaunay_triangulation(
 {
   assert(V.cols() == 2);
   typedef typename DerivedF::Scalar Index;
-  typedef typename DerivedV::Scalar Scalar;
   igl::lexicographic_triangulation(V, orient2D, F);
   const size_t num_faces = F.rows();
   if (num_faces == 0) {

+ 1 - 1
include/igl/dual_contouring.cpp

@@ -374,7 +374,7 @@ namespace igl
         // Should do some reasonable reserves for C2V,vV,vI,vH,vcount
         Q.resize(std::pow(nx*ny*nz,2./3.),triangles?3:4);
 
-        const auto xyz2i = [&nx,&ny,&nz]
+        const auto xyz2i = [&nx,&ny]
           (const int & x, const int & y, const int & z)->Eigen::Index
         {
           return x+nx*(y+ny*(z));

+ 2 - 3
include/igl/edge_collapse_is_valid.cpp

@@ -43,7 +43,6 @@ IGL_INLINE bool igl::edge_collapse_is_valid(
       const int e,
       const bool ccw,
       const Eigen::MatrixXi & F,
-      const Eigen::MatrixXi & E,
       const Eigen::VectorXi & EMAP,
       const Eigen::MatrixXi & EF,
       const Eigen::MatrixXi & EI) 
@@ -62,8 +61,8 @@ IGL_INLINE bool igl::edge_collapse_is_valid(
       list_to_matrix(uN,uNm);
       return uNm;
     };
-    VectorXi Ns = neighbors(e, eflip,F,E,EMAP,EF,EI);
-    VectorXi Nd = neighbors(e,!eflip,F,E,EMAP,EF,EI);
+    VectorXi Ns = neighbors(e, eflip,F,EMAP,EF,EI);
+    VectorXi Nd = neighbors(e,!eflip,F,EMAP,EF,EI);
     VectorXi Nint = igl::intersect(Ns,Nd);
     if(Nint.size() != 4)
     {

+ 0 - 1
include/igl/eigs.cpp

@@ -80,7 +80,6 @@ IGL_INLINE bool igl::eigs(
       sigma = x.dot(A*x)/x.dot(B*x);
       //x *= sigma>0?1.:-1.;
 
-      Scalar err_prev = err;
       err = (A*x-sigma*B*x).array().abs().maxCoeff();
       if(err<conv)
       {

+ 1 - 2
include/igl/embree/unproject_onto_mesh.cpp

@@ -12,7 +12,6 @@
 
 IGL_INLINE bool igl::embree::unproject_onto_mesh(
   const Eigen::Vector2f& pos,
-  const Eigen::MatrixXi& F,
   const Eigen::Matrix4f& model,
   const Eigen::Matrix4f& proj,
   const Eigen::Vector4f& viewport,
@@ -43,7 +42,7 @@ IGL_INLINE bool igl::embree::unproject_onto_mesh(
   int& vid)
 {
   Eigen::Vector3f bc;
-  if(!igl::embree::unproject_onto_mesh(pos,F,model,proj,viewport,ei,fid,bc))
+  if(!igl::embree::unproject_onto_mesh(pos,model,proj,viewport,ei,fid,bc))
   {
     return false;
   }

+ 0 - 2
include/igl/embree/unproject_onto_mesh.h

@@ -22,7 +22,6 @@ namespace igl
     /// the first hit on a mesh.
     ///
     /// @param[in] pos        screen space coordinates
-    /// @param[in] F          #F by 3 face matrix
     /// @param[in] model      model matrix
     /// @param[in] proj       projection matrix
     /// @param[in] viewport   vieweport vector
@@ -32,7 +31,6 @@ namespace igl
     /// @return true if there is a hit
     IGL_INLINE bool unproject_onto_mesh(
       const Eigen::Vector2f& pos,
-      const Eigen::MatrixXi& F,
       const Eigen::Matrix4f& model,
       const Eigen::Matrix4f& proj,
       const Eigen::Vector4f& viewport,

+ 13 - 13
include/igl/exact_geodesic.cpp

@@ -14,7 +14,7 @@
 
 #include "PI.h"
 #include <algorithm>
-#include <cassert>
+#include "IGL_ASSERT.h"
 #include <cmath>
 #include <cstddef>
 #include <ctime>
@@ -586,7 +586,7 @@ public:
 				 double x,
 				 double y,
 				 double z,
-				 PointType t = UNDEFINED_POINT):
+				 PointType /*t = UNDEFINED_POINT*/):
 		m_p(g)
 	{
 		set(x,y,z);
@@ -991,7 +991,7 @@ inline void Mesh::build_adjacencies()
 			f.corner_angles()[j] = angle;
 			sum += angle;
 		}
-		assert(std::abs(sum - igl::PI) < 1e-5);		//algorithm works well with non-degenerate meshes only
+		IGL_ASSERT(std::abs(sum - igl::PI) < 1e-5);		//algorithm works well with non-degenerate meshes only
 	}
 
 		//define m_turn_around_flag for vertices
@@ -1071,13 +1071,13 @@ inline bool Mesh::verify()		//verifies connectivity of the mesh and prints some
 	// 		  << " faces, "		<< m_edges.size()
 	// 		  << " edges\n";
 
-	unsigned total_boundary_edges = 0;
+	//unsigned total_boundary_edges = 0;
 	double longest_edge = 0;
 	double shortest_edge = 1e100;
 	for(unsigned i=0; i<m_edges.size(); ++i)
 	{
 		Edge& e = m_edges[i];
-		total_boundary_edges += e.is_boundary() ? 1 : 0;
+		//total_boundary_edges += e.is_boundary() ? 1 : 0;
 		longest_edge = std::max(longest_edge, e.length());
 		shortest_edge = std::min(shortest_edge, e.length());
 	}
@@ -1110,9 +1110,9 @@ inline bool Mesh::verify()		//verifies connectivity of the mesh and prints some
 	// 		  <<" Z[" << minz << "," << maxz << "]"
 	// 		  << std::endl;
 
-	double dx = maxx - minx;
-	double dy = maxy - miny;
-	double dz = maxz - minz;
+	//double dx = maxx - minx;
+	//double dy = maxy - miny;
+	//double dz = maxz - minz;
 	// std::cout << "approximate diameter of the mesh is "
 	// 		  << sqrt(dx*dx + dy*dy + dz*dz)
 	// 		  << std::endl;
@@ -1163,7 +1163,7 @@ inline void fill_surface_point_structure(geodesic::SurfacePoint* point,
 
 inline void fill_surface_point_double(geodesic::SurfacePoint* point,
 									  double* data,
-									  long mesh_id)
+									  long /*mesh_id*/)
 {
 	data[0] = point->x();
 	data[1] = point->y();
@@ -2217,9 +2217,9 @@ inline unsigned GeodesicAlgorithmExact::intersect_intervals(interval_pointer zer
 
 	double good_start[4];										//points of intersection within the (left, right) limits +"left" + "right"
 	good_start[0] = left;
-	char Ngood_start=1;										//number of the points of the intersection
+	unsigned char Ngood_start=1;										//number of the points of the intersection
 
-	for(char i=0; i<Ninter; ++i)							//for all points of intersection
+	for(unsigned char i=0; i<Ninter; ++i)							//for all points of intersection
 	{
 		double x = inter[i];
 		if(x > left + local_epsilon && x < right - local_epsilon)
@@ -2230,7 +2230,7 @@ inline unsigned GeodesicAlgorithmExact::intersect_intervals(interval_pointer zer
 	good_start[Ngood_start++] = right;
 
 	MapType mid_map[3];
-	for(char i=0; i<Ngood_start-1; ++i)
+	for(unsigned char i=0; i<Ngood_start-1; ++i)
 	{
 		double mid = (good_start[i] + good_start[i+1])*0.5;
 		mid_map[i] = zero->signal(mid) <= one->signal(mid) ? OLD : NEW;
@@ -2336,7 +2336,7 @@ inline void GeodesicAlgorithmExact::propagate(std::vector<SurfacePoint>& sources
 		interval_pointer min_interval = *m_queue.begin();
 		m_queue.erase(m_queue.begin());
 		edge_pointer edge = min_interval->edge();
-		list_pointer list = interval_list(edge);
+		//list_pointer list = interval_list(edge);
 
 		assert(min_interval->d() < GEODESIC_INF);
 

+ 0 - 1
include/igl/fast_find_self_intersections.cpp

@@ -131,7 +131,6 @@ IGL_INLINE bool igl::fast_find_self_intersections(
 
     for(int i=0; i<F.rows(); ++i)
     {
-      int _inter=-1;
       if( intersect(i) ) continue;
 
       BBOX tri_box;

+ 4 - 17
include/igl/fast_winding_number.cpp

@@ -26,16 +26,13 @@ IGL_INLINE void igl::fast_winding_number(
   Eigen::PlainObjectBase<DerivedEC>& EC)
 {
   typedef typename DerivedP::Scalar real_p;
-  typedef typename DerivedN::Scalar real_n;
-  typedef typename DerivedA::Scalar real_a;
   typedef typename DerivedCM::Scalar real_cm;
   typedef typename DerivedR::Scalar real_r;
   typedef typename DerivedEC::Scalar real_ec;
 
-  typedef Eigen::Matrix<real_p,1,3> RowVec3p;
 
   int m = CH.size();
-  int num_terms;
+  int num_terms = -1;
 
   assert(expansion_order < 3 && expansion_order >= 0 && "m must be less than n");
   if(expansion_order == 0){
@@ -45,6 +42,7 @@ IGL_INLINE void igl::fast_winding_number(
   } else if(expansion_order == 2){
       num_terms = 3 + 9 + 27;
   }
+  assert(num_terms > 0);
 
   R.resize(m);
   CM.resize(m,3);
@@ -52,7 +50,7 @@ IGL_INLINE void igl::fast_winding_number(
   EC.setZero(m,num_terms);
   std::function< void(const int) > helper;
   helper = [&helper,
-            &P,&N,&A,&expansion_order,&point_indices,&CH,&EC,&R,&CM]
+            &P,&N,&A,&point_indices,&CH,&EC,&R,&CM]
   (const int index)-> void
   {
       Eigen::Matrix<real_cm,1,3> masscenter;
@@ -144,23 +142,12 @@ IGL_INLINE void igl::fast_winding_number(
   Eigen::PlainObjectBase<DerivedWN>& WN)
 {
 
-  typedef typename DerivedP::Scalar real_p;
-  typedef typename DerivedN::Scalar real_n;
-  typedef typename DerivedA::Scalar real_a;
-  typedef typename DerivedCM::Scalar real_cm;
-  typedef typename DerivedR::Scalar real_r;
   typedef typename DerivedEC::Scalar real_ec;
   typedef typename DerivedQ::Scalar real_q;
   typedef typename DerivedWN::Scalar real_wn;
   const real_wn PI_4 = 4.0*igl::PI;
 
-  typedef Eigen::Matrix<
-    typename DerivedEC::Scalar,
-    1,
-    DerivedEC::ColsAtCompileTime> ECRow;
-
   typedef Eigen::Matrix<real_q,1,3> RowVec;
-  typedef Eigen::Matrix<real_ec,3,3> EC_3by3;
 
   auto direct_eval = [&PI_4](
     const RowVec & loc,
@@ -240,7 +227,7 @@ IGL_INLINE void igl::fast_winding_number(
   helper = [&helper,
             &P,&N,&A,
             &point_indices,&CH,
-            &CM,&R,&EC,&beta,
+            &CM,&R,&beta,
             &direct_eval,&expansion_eval]
   (const RowVec & query, const std::vector<int> & near_indices)-> real_wn
   {

+ 0 - 1
include/igl/grid.cpp

@@ -20,7 +20,6 @@ IGL_INLINE void igl::grid(
   GV.resize(res.array().prod(),res.size());
   const auto lerp = 
     [&res](const Scalar di, const int d)->Scalar{return di/(Scalar)(res(d)-1);};
-  int gi = 0;
   Derivedres sub;
   sub.resizeLike(res);
   sub.setConstant(0);

+ 0 - 1
include/igl/heat_geodesics.cpp

@@ -40,7 +40,6 @@ IGL_INLINE bool igl::heat_geodesics_precompute(
   HeatGeodesicsData<Scalar> & data)
 {
   typedef Eigen::Matrix<Scalar,Eigen::Dynamic,1> VectorXS;
-  typedef Eigen::Matrix<Scalar,Eigen::Dynamic,Eigen::Dynamic> MatrixXS;
   Eigen::SparseMatrix<Scalar> L,M;
   Eigen::Matrix<Scalar,Eigen::Dynamic,3> l_intrinsic;
   DerivedF F_intrinsic;

+ 8 - 9
include/igl/intrinsic_delaunay_triangulation.cpp

@@ -11,6 +11,7 @@
 #include "unique_edge_map.h"
 #include "flip_edge.h"
 #include "EPS.h"
+#include "IGL_ASSERT.h"
 #include <iostream>
 #include <queue>
 #include <map>
@@ -129,21 +130,19 @@ IGL_INLINE void igl::intrinsic_delaunay_triangulation(
         //          v2                 v2
         //
         // Compute intrinsic length of oppposite edge
-        assert(uE2E[uei].size() == 2 && "edge should have 2 incident faces");
+        IGL_ASSERT(uE2E[uei].size() == 2 && "edge should have 2 incident faces");
         const Index f1 = uE2E[uei][0]%num_faces;
         const Index f2 = uE2E[uei][1]%num_faces;
         const Index c1 = uE2E[uei][0]/num_faces;
         const Index c2 = uE2E[uei][1]/num_faces;
-        assert(c1 < 3);
-        assert(c2 < 3);
-        assert(f1 != f2);
+        IGL_ASSERT(c1 < 3);
+        IGL_ASSERT(c2 < 3);
+        IGL_ASSERT(f1 != f2);
         const Index v1 = F(f1, (c1+1)%3);
         const Index v2 = F(f1, (c1+2)%3);
-        const Index v4 = F(f1, c1);
-        const Index v3 = F(f2, c2);
-        assert(F(f2, (c2+2)%3) == v1);
-        assert(F(f2, (c2+1)%3) == v2);
-        assert( std::abs(l(f1,c1)-l(f2,c2)) < igl::EPS<Scalar>() );
+        IGL_ASSERT(F(f2, (c2+2)%3) == v1);
+        IGL_ASSERT(F(f2, (c2+1)%3) == v2);
+        IGL_ASSERT( std::abs(l(f1,c1)-l(f2,c2)) < igl::EPS<Scalar>() );
         const Scalar e = l(f1,c1);
         const Scalar a = l(f1,(c1+1)%3);
         const Scalar b = l(f1,(c1+2)%3);

+ 4 - 4
include/igl/is_irregular_vertex.cpp

@@ -10,8 +10,8 @@
 
 #include "is_border_vertex.h"
 
-template <typename DerivedV, typename DerivedF>
-IGL_INLINE std::vector<bool> igl::is_irregular_vertex(const Eigen::MatrixBase<DerivedV> &V, const Eigen::MatrixBase<DerivedF> &F)
+template <typename DerivedF>
+IGL_INLINE std::vector<bool> igl::is_irregular_vertex(const Eigen::MatrixBase<DerivedF> &F)
 {
   Eigen::VectorXi count = Eigen::VectorXi::Zero(F.maxCoeff()+1);
 
@@ -51,6 +51,6 @@ IGL_INLINE std::vector<bool> igl::is_irregular_vertex(const Eigen::MatrixBase<De
 
 #ifdef IGL_STATIC_LIBRARY
 // Explicit template instantiation
-template std::vector<bool, std::allocator<bool> > igl::is_irregular_vertex<Eigen::Matrix<double, -1, 3, 0, -1, 3>, Eigen::Matrix<int, -1, 3, 0, -1, 3> >(Eigen::MatrixBase<Eigen::Matrix<double, -1, 3, 0, -1, 3> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, 3, 0, -1, 3> > const&);
-template std::vector<bool, std::allocator<bool> > igl::is_irregular_vertex<Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, -1, 0, -1, -1> >(Eigen::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&);
+template std::vector<bool, std::allocator<bool> > igl::is_irregular_vertex<Eigen::Matrix<int, -1, 3, 0, -1, 3> >  (Eigen::MatrixBase<Eigen::Matrix<int, -1, 3, 0, -1, 3> > const&);
+template std::vector<bool, std::allocator<bool> > igl::is_irregular_vertex<Eigen::Matrix<int, -1, -1, 0, -1, -1> >(Eigen::MatrixBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&);
 #endif

+ 2 - 3
include/igl/is_irregular_vertex.h

@@ -17,12 +17,11 @@ namespace igl
   /// Determine if a vertex is irregular, i.e. it has more than 6 (triangles)
   /// or 4 (quads) incident edges. Vertices on the boundary are ignored.
   ///
-  /// @param[in] V  #V by dim list of vertex positions
   /// @param[in] F  #F by 3[4] list of triangle[quads] indices
   /// @return #V vector of bools revealing whether vertices are singular
   ///
-  template <typename DerivedV, typename DerivedF>
-  IGL_INLINE std::vector<bool> is_irregular_vertex(const Eigen::MatrixBase<DerivedV> &V, const Eigen::MatrixBase<DerivedF> &F);
+  template <typename DerivedF>
+  IGL_INLINE std::vector<bool> is_irregular_vertex(const Eigen::MatrixBase<DerivedF> &F);
 }
 
 #ifndef IGL_STATIC_LIBRARY

+ 2 - 6
include/igl/is_sparse.cpp

@@ -7,22 +7,18 @@
 // obtain one at http://mozilla.org/MPL/2.0/.
 #include "is_sparse.h"
 template <typename T>
-IGL_INLINE bool igl::is_sparse(
-  const Eigen::SparseMatrix<T> & A)
+IGL_INLINE bool igl::is_sparse(const Eigen::SparseMatrix<T> &)
 {
   return true;
 }
 template <typename DerivedA>
-IGL_INLINE bool igl::is_sparse(
-  const Eigen::PlainObjectBase<DerivedA>& A)
+IGL_INLINE bool igl::is_sparse(const Eigen::PlainObjectBase<DerivedA>& )
 {
   return false;
 }
 
 #ifdef IGL_STATIC_LIBRARY
 // Explicit template instantiation
-// generated by autoexplicit.sh
 template bool igl::is_sparse<double>(Eigen::SparseMatrix<double, 0, int> const&);
-// generated by autoexplicit.sh
 template bool igl::is_sparse<Eigen::Matrix<double, -1, -1, 0, -1, -1> >(Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&);
 #endif

+ 0 - 1
include/igl/is_vertex_manifold.cpp

@@ -25,7 +25,6 @@ IGL_INLINE bool igl::is_vertex_manifold(
   assert(F.cols() == 3 && "F must contain triangles");
   typedef typename DerivedF::Scalar Index;
   typedef typename DerivedF::Index FIndex;
-  const FIndex m = F.rows();
   const Index n = F.maxCoeff()+1;
   vector<vector<vector<FIndex > > > TT;
   vector<vector<vector<FIndex > > > TTi;

+ 15 - 27
include/igl/isolines_intrinsic.cpp

@@ -33,8 +33,6 @@ void igl::isolines_intrinsic(
   Eigen::PlainObjectBase<DerivediE> & iE,
   Eigen::PlainObjectBase<DerivedI> & I)
 {
-  using Scalar = typename DerivedS::Scalar;
-
   Eigen::MatrixXi uE;
   Eigen::VectorXi EMAP,uEC,uEE;
 
@@ -86,7 +84,6 @@ void igl::isolines_intrinsic(
   Eigen::PlainObjectBase<DerivediE> & iE)
 {
   using Scalar = typename DerivedS::Scalar;
-  using VectorXS = Eigen::Matrix<Scalar,Eigen::Dynamic,1>;
 
   std::unordered_map<int,int> uE2I;
   Eigen::Matrix<Scalar,Eigen::Dynamic,1> T;
@@ -95,32 +92,24 @@ void igl::isolines_intrinsic(
   iB.resize(uE2I.size(),F.cols());
   iFI.resize(uE2I.size());
   Eigen::VectorXi U(uE2I.size());
-  const auto flipped = 
-    [&uE,&F,&EMAP,&uEE,&uEC](const int u, const int f, const int k)->bool
-  {
-    return uE(u,0) != F(f,(k+1)%3);
-  };
-  // for each value in uE2I
+  for(auto & pair : uE2I)
   {
-    for(auto & pair : uE2I)
-    {
-      const int u = pair.first;
-      const int w = pair.second;
-      // first face incident on uE(u,:)
-      const int e = uEE(uEC(u));
-      const int f = e % F.rows();
-      const int k = e / F.rows();
-      const bool flip = uE(u,0) != F(f,(k+1)%3);
-      const double t = T(w);
-      iB(w,k) = 0;
-      iB(w,(k+1)%3) = flip?  t:1-t;
-      iB(w,(k+2)%3) = flip?1-t:t;
-      iFI(w) = f;
-      U(w) = u;
-    }
+    const int u = pair.first;
+    const int w = pair.second;
+    // first face incident on uE(u,:)
+    const int e = uEE(uEC(u));
+    const int f = e % F.rows();
+    const int k = e / F.rows();
+    const bool flip = uE(u,0) != F(f,(k+1)%3);
+    const double t = T(w);
+    iB(w,k) = 0;
+    iB(w,(k+1)%3) = flip?  t:1-t;
+    iB(w,(k+2)%3) = flip?1-t:t;
+    iFI(w) = f;
+    U(w) = u;
   }
   
-  const int num_edge_crossings = iB.rows();
+  
   // Vertex crossings
   std::unordered_map<int,int> V2I;
   {
@@ -154,7 +143,6 @@ void igl::isolines_intrinsic(
     iB.conservativeResize(k,Eigen::NoChange);
     iFI.conservativeResize(k,Eigen::NoChange);
   }
-  const int num_vertex_crossings = iB.rows()-num_edge_crossings;
 
   iE.resize(uE2I.size(),2);
   const auto set_row = [&iE](const int k, const int i, const int j)

+ 0 - 3
include/igl/iterative_closest_point.cpp

@@ -38,9 +38,6 @@ IGL_INLINE void igl::iterative_closest_point(
 
   typedef typename DerivedVX::Scalar Scalar;
   typedef Eigen::Matrix<Scalar,Eigen::Dynamic,Eigen::Dynamic> MatrixXS;
-  typedef Eigen::Matrix<Scalar,Eigen::Dynamic,1> VectorXS;
-  typedef Eigen::Matrix<Scalar,3,3> Matrix3S;
-  typedef Eigen::Matrix<Scalar,1,3> RowVector3S;
 
   // Precompute BVH on Y
   AABB<DerivedVY,3> Ytree;

+ 0 - 1
include/igl/loop.cpp

@@ -24,7 +24,6 @@ IGL_INLINE void igl::loop(
   Eigen::SparseMatrix<SType>& S,
   Eigen::PlainObjectBase<DerivedNF> & NF)
 {
-  typedef Eigen::SparseMatrix<SType> SparseMat;
   typedef Eigen::Triplet<SType> Triplet_t;
 
   //Ref. https://graphics.stanford.edu/~mdfisher/subdivision.html

+ 1 - 1
include/igl/marching_cubes.cpp

@@ -37,7 +37,7 @@ IGL_INLINE void igl::marching_cubes(
   Index n = 0;
   Index m = 0;
 
-  const auto xyz2i = [&nx,&ny,&nz]
+  const auto xyz2i = [&nx,&ny]
     (const int & x, const int & y, const int & z)->unsigned
   {
     return x+nx*(y+ny*(z));

+ 0 - 1
include/igl/matlab/prepare_lhs.cpp

@@ -32,7 +32,6 @@ IGL_INLINE void igl::matlab::prepare_lhs_logical(
   const auto m = V.rows();
   const auto n = V.cols();
   plhs[0] = mxCreateLogicalMatrix(m,n);
-  mxLogical * Vp = static_cast<mxLogical*>(mxGetData(plhs[0]));
   Eigen::Map< Eigen::Matrix<mxLogical,Eigen::Dynamic,Eigen::Dynamic> >
     map(static_cast<mxLogical*>(mxGetData(plhs[0])),m,n);
   map = V.template cast<mxLogical>();

+ 0 - 1
include/igl/min_quad_with_fixed.impl.h

@@ -401,7 +401,6 @@ IGL_INLINE bool igl::min_quad_with_fixed_solve(
 {
   using namespace std;
   using namespace Eigen;
-  typedef Matrix<T,Dynamic,1> VectorXT;
   typedef Matrix<T,Dynamic,Dynamic> MatrixXT;
   // number of known rows
   int kr = data.known.size();

+ 2 - 0
include/igl/octree.cpp

@@ -88,6 +88,8 @@ namespace igl {
     const Vector8i neg_ones = Vector8i::Constant(-1);
   
     std::function< void(const ChildrenType, const int) > helper;
+    // VSC and clang don't agree on whether MAX_DEPTH needs to be in the capture
+    // list.
     helper = [&helper,&translate_center,&get_octant,&m,
               &zero_to_seven,&neg_ones,&P,
               &point_indices,&children,&centers,&widths,&MAX_DEPTH]

+ 1 - 1
include/igl/opengl/ViewerCore.cpp

@@ -326,7 +326,7 @@ IGL_INLINE void igl::opengl::ViewerCore::deinitialize_shadow_pass()
 
 IGL_INLINE void igl::opengl::ViewerCore::draw_shadow_pass(
   ViewerData& data,
-  bool update_matrices)
+  bool /*update_matrices*/)
 {
   if (data.dirty)
   {

+ 9 - 12
include/igl/opengl/ViewerData.cpp

@@ -20,18 +20,20 @@
 
 
 IGL_INLINE igl::opengl::ViewerData::ViewerData()
-: dirty(MeshGL::DIRTY_ALL),
-  show_faces        (~unsigned(0)),
-  show_lines        (~unsigned(0)),
+: 
+  dirty(MeshGL::DIRTY_ALL),
   face_based        (false),
   double_sided      (false),
   invert_normals    (false),
+  is_visible        (~unsigned(0)),
+  show_custom_labels(0),
+  show_face_labels  (0),
+  show_faces        (~unsigned(0)),
+  show_lines        (~unsigned(0)),
   show_overlay      (~unsigned(0)),
   show_overlay_depth(~unsigned(0)),
-  show_vertex_labels(0),
-  show_face_labels  (0),
-  show_custom_labels(0),
   show_texture      (false),
+  show_vertex_labels(0),
   use_matcap        (false),
   point_size(30),
   line_width(0.5f),
@@ -39,8 +41,7 @@ IGL_INLINE igl::opengl::ViewerData::ViewerData()
   line_color(0,0,0,1),
   label_color(0,0,0.04,1),
   shininess(35.0f),
-  id(-1),
-  is_visible        (~unsigned(0))
+  id(-1)
 {
   clear();
 };
@@ -614,7 +615,6 @@ IGL_INLINE void igl::opengl::ViewerData::grid_texture()
 
 // Populate VBOs of a particular label stype (Vert, Face, Custom)
 IGL_INLINE void igl::opengl::ViewerData::update_labels(
-  igl::opengl::MeshGL& meshgl,
   igl::opengl::MeshGL::TextGL& GL_labels,
   const Eigen::MatrixXd& positions,
   const std::vector<std::string>& strings
@@ -887,7 +887,6 @@ IGL_INLINE void igl::opengl::ViewerData::updateGL(
       }
     }
     update_labels(
-      meshgl,
       meshgl.face_labels,
       face_labels_positions,
       face_labels_strings
@@ -908,7 +907,6 @@ IGL_INLINE void igl::opengl::ViewerData::updateGL(
       }
     }
     update_labels(
-      meshgl,
       meshgl.vertex_labels,
       vertex_labels_positions,
       vertex_labels_strings
@@ -918,7 +916,6 @@ IGL_INLINE void igl::opengl::ViewerData::updateGL(
   if (meshgl.dirty & MeshGL::DIRTY_CUSTOM_LABELS)
   {
     update_labels(
-      meshgl,
       meshgl.custom_labels,
       labels_positions,
       labels_strings

+ 5 - 7
include/igl/opengl/ViewerData.h

@@ -305,15 +305,15 @@ public:
   /// Each option is a binary mask specifying on which viewport each option is set.
   /// When using a single viewport, standard boolean can still be used for simplicity.
   unsigned int is_visible;
+  unsigned int show_custom_labels;
+  unsigned int show_face_labels;
+  unsigned int show_faces;
+  unsigned int show_lines;
   unsigned int show_overlay;
   unsigned int show_overlay_depth;
   unsigned int show_texture;
-  unsigned int use_matcap;
-  unsigned int show_faces;
-  unsigned int show_lines;
   unsigned int show_vertex_labels;
-  unsigned int show_face_labels;
-  unsigned int show_custom_labels;
+  unsigned int use_matcap;
 
   /// Point size / line width
   float point_size;
@@ -338,12 +338,10 @@ public:
 
   /// Update contents from a 'Data' instance
   ///
-  /// @param[in,out] meshgl  mesh to be updated
   /// @param[in,out] GL_labels  labels to be updated
   /// @param[in] positions  positions of the labels
   /// @param[in] strings  strings of the labels
   IGL_INLINE void update_labels(
-    igl::opengl::MeshGL& meshgl,
     igl::opengl::MeshGL::TextGL& GL_labels,
     const Eigen::MatrixXd& positions,
     const std::vector<std::string>& strings

+ 15 - 12
include/igl/opengl/glfw/Viewer.cpp

@@ -52,7 +52,7 @@ static double highdpih = 1; // High DPI height
 static double scroll_x = 0;
 static double scroll_y = 0;
 
-static void glfw_mouse_press(GLFWwindow* window, int button, int action, int modifier)
+static void glfw_mouse_press(GLFWwindow* /*window*/, int button, int action, int modifier)
 {
 
   igl::opengl::glfw::Viewer::MouseButton mb;
@@ -70,17 +70,17 @@ static void glfw_mouse_press(GLFWwindow* window, int button, int action, int mod
     __viewer->mouse_up(mb,modifier);
 }
 
-static void glfw_error_callback(int error, const char* description)
+static void glfw_error_callback(int /*error*/, const char* description)
 {
   fputs(description, stderr);
 }
 
-static void glfw_char_mods_callback(GLFWwindow* window, unsigned int codepoint, int modifier)
+static void glfw_char_mods_callback(GLFWwindow* /*window*/ , unsigned int codepoint, int modifier)
 {
   __viewer->key_pressed(codepoint, modifier);
 }
 
-static void glfw_key_callback(GLFWwindow* window, int key, int scancode, int action, int modifier)
+static void glfw_key_callback(GLFWwindow* window , int key, int /*scancode*/, int action, int modifier)
 {
   if (key == GLFW_KEY_ESCAPE && action == GLFW_PRESS)
     glfwSetWindowShouldClose(window, GL_TRUE);
@@ -91,7 +91,7 @@ static void glfw_key_callback(GLFWwindow* window, int key, int scancode, int act
     __viewer->key_up(key, modifier);
 }
 
-static void glfw_window_size(GLFWwindow* window, int width, int height)
+static void glfw_window_size(GLFWwindow* /*window*/ , int width, int height)
 {
   int w = width*highdpiw;
   int h = height*highdpih;
@@ -100,12 +100,12 @@ static void glfw_window_size(GLFWwindow* window, int width, int height)
 
 }
 
-static void glfw_mouse_move(GLFWwindow* window, double x, double y)
+static void glfw_mouse_move(GLFWwindow* /*window*/ , double x, double y)
 {
   __viewer->mouse_move(x*highdpiw, y*highdpih);
 }
 
-static void glfw_mouse_scroll(GLFWwindow* window, double x, double y)
+static void glfw_mouse_scroll(GLFWwindow* /*window*/ , double x, double y)
 {
   using namespace std;
   scroll_x += x;
@@ -114,7 +114,7 @@ static void glfw_mouse_scroll(GLFWwindow* window, double x, double y)
   __viewer->mouse_scroll(y);
 }
 
-static void glfw_drop_callback(GLFWwindow *window,int count,const char **filenames)
+static void glfw_drop_callback(GLFWwindow * /*window*/,int /*count*/,const char ** /*filenames*/)
 {
 }
 
@@ -125,18 +125,21 @@ namespace opengl
 namespace glfw
 {
 
-  IGL_INLINE int Viewer::launch(bool resizable /*= true*/, bool fullscreen /*= false*/,
+  IGL_INLINE int Viewer::launch(bool fullscreen /*= false*/,
     const std::string &name, int windowWidth /*= 0*/, int windowHeight /*= 0*/)
   {
     // TODO return values are being ignored...
-    launch_init(resizable,fullscreen,name,windowWidth,windowHeight);
+    launch_init(fullscreen,name,windowWidth,windowHeight);
     launch_rendering(true);
     launch_shut();
     return EXIT_SUCCESS;
   }
 
-  IGL_INLINE int  Viewer::launch_init(bool resizable, bool fullscreen,
-    const std::string &name, int windowWidth, int windowHeight)
+  IGL_INLINE int  Viewer::launch_init(
+    bool fullscreen,
+    const std::string &name, 
+    int windowWidth, 
+    int windowHeight)
   {
     glfwSetErrorCallback(glfw_error_callback);
     if (!glfwInit())

+ 2 - 2
include/igl/opengl/glfw/Viewer.h

@@ -45,8 +45,8 @@ namespace glfw
     // UI Enumerations
     enum class MouseButton {Left, Middle, Right};
     enum class MouseMode { None, Rotation, Zoom, Pan, Translation} mouse_mode;
-    IGL_INLINE int launch(bool resizable = true, bool fullscreen = false, const std::string &name = "libigl viewer", int width = 0, int height = 0);
-    IGL_INLINE int launch_init(bool resizable = true, bool fullscreen = false, const std::string &name = "libigl viewer", int width = 0, int height = 0);
+    IGL_INLINE int launch     (bool fullscreen = false, const std::string &name = "libigl viewer", int width = 0, int height = 0);
+    IGL_INLINE int launch_init(bool fullscreen = false, const std::string &name = "libigl viewer", int width = 0, int height = 0);
     IGL_INLINE bool launch_rendering(bool loop = true);
     IGL_INLINE void launch_shut();
     IGL_INLINE void init();

+ 12 - 12
include/igl/opengl/glfw/ViewerPlugin.h

@@ -45,14 +45,14 @@ namespace igl
           /// This function is called before shutdown
           IGL_INLINE virtual void shutdown() { }
           /// This function is called before a mesh is loaded
-          IGL_INLINE virtual bool load(std::string filename) { return false; }
+          IGL_INLINE virtual bool load(std::string /*filename*/) { return false; }
           /// This function is called before a mesh is saved
-          IGL_INLINE virtual bool save(std::string filename) { return false; }
+          IGL_INLINE virtual bool save(std::string /*filename*/) { return false; }
           /// This function is called when the scene is serialized
-          IGL_INLINE virtual bool serialize(std::vector<char>& buffer) const 
+          IGL_INLINE virtual bool serialize(std::vector<char>& /*buffer*/) const 
             { return false; }
           /// This function is called when the scene is deserialized
-          IGL_INLINE virtual bool deserialize(const std::vector<char>& buffer)
+          IGL_INLINE virtual bool deserialize(const std::vector<char>& /*buffer*/)
             { return false; }
           /// Runs immediately after a new mesh has been loaded.
           IGL_INLINE virtual bool post_load() { return false; }
@@ -61,20 +61,20 @@ namespace igl
           /// This function is called after the draw procedure of Viewer
           IGL_INLINE virtual bool post_draw() { return false; }
           /// This function is called after the window has been resized
-          IGL_INLINE virtual void post_resize(int w, int h) { }
-          IGL_INLINE virtual bool mouse_down(int button, int modifier)
+          IGL_INLINE virtual void post_resize(int /*w*/, int /*h*/) { }
+          IGL_INLINE virtual bool mouse_down(int /*button*/, int /*modifier*/)
             { return false; }
-          IGL_INLINE virtual bool mouse_up(int button, int modifier)
+          IGL_INLINE virtual bool mouse_up(int /*button*/, int /*modifier*/)
             { return false; }
-          IGL_INLINE virtual bool mouse_move(int mouse_x, int mouse_y)
+          IGL_INLINE virtual bool mouse_move(int /*mouse_x*/, int /*mouse_y*/)
             { return false; }
-          IGL_INLINE virtual bool mouse_scroll(float delta_y)
+          IGL_INLINE virtual bool mouse_scroll(float /*delta_y*/)
             { return false; }
-          IGL_INLINE virtual bool key_pressed(unsigned int key, int modifiers)
+          IGL_INLINE virtual bool key_pressed(unsigned int /*key*/, int /*modifiers*/)
             { return false; }
-          IGL_INLINE virtual bool key_down(int key, int modifiers)
+          IGL_INLINE virtual bool key_down(int /*key*/, int /*modifiers*/)
             { return false; }
-          IGL_INLINE virtual bool key_up(int key, int modifiers)
+          IGL_INLINE virtual bool key_up(int /*key*/, int /*modifiers*/)
             { return false; }
           std::string plugin_name;
         protected:

+ 1 - 1
include/igl/opengl/glfw/background_window.cpp

@@ -5,7 +5,7 @@
 IGL_INLINE bool igl::opengl::glfw::background_window(GLFWwindow* & window)
 {
   if(!glfwInit()) return false;
-  glfwSetErrorCallback([](int id,const char* m){std::cerr<<m<<std::endl;});
+  glfwSetErrorCallback([](int /*id*/,const char* m){std::cerr<<m<<std::endl;});
   glfwWindowHint(GLFW_SAMPLES, 4);
   // Use 3.2 core profile
   glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);

+ 6 - 6
include/igl/opengl/glfw/imgui/ImGuiWidget.h

@@ -36,17 +36,17 @@ namespace igl
               { viewer = _viewer; plugin = _plugin; }
             IGL_INLINE virtual void shutdown() {}
             IGL_INLINE virtual void draw() {}
-            IGL_INLINE virtual bool mouse_down(int button, int modifier)
+            IGL_INLINE virtual bool mouse_down(int /*button*/, int /*modifier*/)
               { return false;}
-            IGL_INLINE virtual bool mouse_up(int button, int modifier)
+            IGL_INLINE virtual bool mouse_up(int /*button*/, int /*modifier*/)
               { return false;}
-            IGL_INLINE virtual bool mouse_move(int mouse_x, int mouse_y)
+            IGL_INLINE virtual bool mouse_move(int /*mouse_x*/, int /*mouse_y*/)
               { return false;}
-            IGL_INLINE virtual bool key_pressed(unsigned int key, int modifiers)
+            IGL_INLINE virtual bool key_pressed(unsigned int /*key*/, int /*modifiers*/)
               { return false;}
-            IGL_INLINE virtual bool key_down(int key, int modifiers)
+            IGL_INLINE virtual bool key_down(int /*key*/, int /*modifiers*/)
               { return false;}
-            IGL_INLINE virtual bool key_up(int key, int modifiers)
+            IGL_INLINE virtual bool key_up(int /*key*/, int /*modifiers*/)
               { return false;}
             std::string name;
           protected:

+ 6 - 5
include/igl/opengl/glfw/imgui/SelectionWidget.cpp

@@ -30,7 +30,8 @@ igl::opengl::glfw::imgui::SelectionWidget usage:
 IGL_INLINE void SelectionWidget::draw()
 {
   if(mode == OFF){ return; }
-  ImGuiIO& io = ImGui::GetIO();
+  // Is this call necessary?
+  ImGui::GetIO();
 
   float width, height;
   float highdpi = 1.0;
@@ -81,7 +82,7 @@ IGL_INLINE void SelectionWidget::draw()
 
 }
 
-IGL_INLINE bool SelectionWidget::mouse_down(int button, int modifier)
+IGL_INLINE bool SelectionWidget::mouse_down(int /*button*/, int modifier)
 {
   if(mode == OFF || (modifier & IGL_MOD_ALT) ){ return false;}
   is_down = true;
@@ -97,7 +98,7 @@ IGL_INLINE bool SelectionWidget::mouse_down(int button, int modifier)
   return true;
 }
 
-IGL_INLINE bool SelectionWidget::mouse_up(int button, int modifier)
+IGL_INLINE bool SelectionWidget::mouse_up(int /*button*/, int /*modifier*/)
 {
   is_down = false;
   // are we done? Check first and last lasso point (need at least 3 (2 real
@@ -111,7 +112,7 @@ IGL_INLINE bool SelectionWidget::mouse_up(int button, int modifier)
   return false;
 }
 
-IGL_INLINE bool SelectionWidget::mouse_move(int mouse_x, int mouse_y)
+IGL_INLINE bool SelectionWidget::mouse_move(int /*mouse_x*/, int /*mouse_y*/)
 {
   if(!is_drawing){ return false; }
   if(!has_moved_since_down)
@@ -140,7 +141,7 @@ IGL_INLINE bool SelectionWidget::mouse_move(int mouse_x, int mouse_y)
   return true;
 }
 
-IGL_INLINE bool SelectionWidget::key_pressed(unsigned int key, int modifiers)
+IGL_INLINE bool SelectionWidget::key_pressed(unsigned int key, int /*modifiers*/)
 {
   Mode old = mode;
   if(OFF_KEY.find(char(key)) != std::string::npos)

+ 2 - 2
include/igl/opengl/init_render_to_texture.cpp

@@ -7,7 +7,7 @@
 // obtain one at http://mozilla.org/MPL/2.0/.
 #include "init_render_to_texture.h"
 #include "gl.h"
-#include <cassert>
+#include "../IGL_ASSERT.h"
 
 IGL_INLINE void igl::opengl::init_render_to_texture(
   const size_t width,
@@ -66,7 +66,7 @@ IGL_INLINE void igl::opengl::init_render_to_texture(
   //Does the GPU support current FBO configuration?
   GLenum status;
   status = glCheckFramebufferStatus(GL_FRAMEBUFFER);
-  assert(status == GL_FRAMEBUFFER_COMPLETE);
+  IGL_ASSERT(status == GL_FRAMEBUFFER_COMPLETE);
   // Unbind to clean up
   if(!depth_texture)
   {

+ 1 - 2
include/igl/opengl/stb/render_to_file.cpp

@@ -15,8 +15,7 @@ IGL_INLINE bool igl::opengl::stb::render_to_file(
   const std::string filename,
   const int width,
   const int height,
-  const bool alpha,
-  const bool fast)
+  const bool alpha)
 {
   unsigned char * data = new unsigned char[4*width*height];
   glReadPixels(

+ 1 - 3
include/igl/opengl/stb/render_to_file.h

@@ -22,7 +22,6 @@ namespace igl
       /// @param[in] width  width of scene and resulting image
       /// @param[in] height height of scene and resulting image
       /// @param[in] alpha  whether to include alpha channel
-      /// @param[in] fast  sacrifice compression ratio for speed
       /// @return true only if no errors occurred
       ///
       /// \see igl::stb::write_image, render_to_file_async
@@ -30,8 +29,7 @@ namespace igl
         const std::string filename,
         const int width,
         const int height,
-        const bool alpha = true,
-        const bool fast = false);
+        const bool alpha = true);
     }
   }
 }

+ 3 - 5
include/igl/opengl/stb/render_to_file_async.cpp

@@ -13,8 +13,7 @@
 static IGL_INLINE bool render_to_file_async_helper(
   unsigned char * img, int width, int height,
   const std::string filename,
-  const bool alpha,
-  const bool fast)
+  const bool alpha)
 {
   //img->flip();
   if(!alpha)
@@ -35,8 +34,7 @@ IGL_INLINE std::thread igl::opengl::stb::render_to_file_async(
   const std::string filename,
   const int width,
   const int height,
-  const bool alpha,
-  const bool fast)
+  const bool alpha)
 {
   // Part that should serial
   unsigned char * data = new unsigned char[width*height];
@@ -49,7 +47,7 @@ IGL_INLINE std::thread igl::opengl::stb::render_to_file_async(
     GL_UNSIGNED_BYTE,
     data);
   // Part that should be asynchronous
-  std::thread t(render_to_file_async_helper,data,width,height,filename,alpha,fast);
+  std::thread t(render_to_file_async_helper,data,width,height,filename,alpha);
   t.detach();
   return t;
 }

+ 1 - 3
include/igl/opengl/stb/render_to_file_async.h

@@ -27,7 +27,6 @@ namespace igl
       /// @param[in] width  width of scene and resulting image
       /// @param[in] height height of scene and resulting image
       /// @param[in] alpha  whether to include alpha channel
-      /// @param[in] fast  sacrifice compression ratio for speed
       /// @return true only if no errors occurred
       ///
       /// \see render_to_file
@@ -35,8 +34,7 @@ namespace igl
         const std::string filename,
         const int width,
         const int height,
-        const bool alpha = true,
-        const bool fast = false);
+        const bool alpha = true);
     }
   }
 }

+ 2 - 1
include/igl/opengl/vertex_array.cpp

@@ -1,5 +1,6 @@
 #include "vertex_array.h"
 #include "report_gl_error.h"
+#include "../IGL_ASSERT.h"
 
 template <
   typename DerivedV,
@@ -41,7 +42,7 @@ IGL_INLINE void igl::opengl::vertex_array(
   const auto size_FScalar = sizeof(typename DerivedF::Scalar);
   glBufferData(GL_ARRAY_BUFFER,size_VScalar*V.size(),V.data(),GL_STATIC_DRAW);
   glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, eab_id);
-  assert(sizeof(GLuint) == size_FScalar && "F type does not match GLuint");
+  IGL_ASSERT(sizeof(GLuint) == size_FScalar && "F type does not match GLuint");
   glBufferData(
     GL_ELEMENT_ARRAY_BUFFER, sizeof(GLuint)*F.size(), F.data(), GL_STATIC_DRAW);
   glVertexAttribPointer(

+ 7 - 7
include/igl/predicates/predicates.cpp

@@ -16,12 +16,12 @@ namespace predicates {
 using REAL = IGL_PREDICATES_REAL;
 
 #ifdef LIBIGL_PREDICATES_USE_FLOAT
-#define IGL_ASSERT_SCALAR(Vector)                        \
+#define IGL_PREDICATES_ASSERT_SCALAR(Vector)                        \
   static_assert(                                         \
     std::is_same<typename Vector::Scalar, float>::value, \
     "Shewchuk's exact predicates only support float")
 #else
-#define IGL_ASSERT_SCALAR(Vector)                           \
+#define IGL_PREDICATES_ASSERT_SCALAR(Vector)                           \
   static_assert(                                            \
     std::is_same<typename Vector::Scalar, double>::value || \
     std::is_same<typename Vector::Scalar, float>::value,    \
@@ -49,7 +49,7 @@ IGL_INLINE Orientation orient2d(
     const Eigen::MatrixBase<Vector2D>& pc)
 {
   EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(Vector2D, 2);
-  IGL_ASSERT_SCALAR(Vector2D);
+  IGL_PREDICATES_ASSERT_SCALAR(Vector2D);
 
   using Point = Eigen::Matrix<REAL, 2, 1>;
   Point a{pa[0], pa[1]};
@@ -71,7 +71,7 @@ IGL_INLINE Orientation orient3d(
     const Eigen::MatrixBase<Vector3D>& pd)
 {
   EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(Vector3D, 3);
-  IGL_ASSERT_SCALAR(Vector3D);
+  IGL_PREDICATES_ASSERT_SCALAR(Vector3D);
 
   using Point = Eigen::Matrix<REAL, 3, 1>;
   Point a{pa[0], pa[1], pa[2]};
@@ -94,7 +94,7 @@ IGL_INLINE Orientation incircle(
     const Eigen::MatrixBase<Vector2D>& pd)
 {
   EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(Vector2D, 2);
-  IGL_ASSERT_SCALAR(Vector2D);
+  IGL_PREDICATES_ASSERT_SCALAR(Vector2D);
 
   using Point = Eigen::Matrix<REAL, 2, 1>;
   Point a{pa[0], pa[1]};
@@ -118,7 +118,7 @@ IGL_INLINE Orientation insphere(
     const Eigen::MatrixBase<Vector3D>& pe)
 {
   EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(Vector3D, 3);
-  IGL_ASSERT_SCALAR(Vector3D);
+  IGL_PREDICATES_ASSERT_SCALAR(Vector3D);
 
   using Point = Eigen::Matrix<REAL, 3, 1>;
   Point a{pa[0], pa[1], pa[2]};
@@ -137,7 +137,7 @@ IGL_INLINE Orientation insphere(
 }
 }
 
-#undef IGL_ASSERT_SCALAR
+#undef IGL_PREDICATES_ASSERT_SCALAR
 
 #ifdef IGL_STATIC_LIBRARY
 // Explicit template instantiation

+ 0 - 2
include/igl/predicates/segment_segment_intersect.cpp

@@ -17,8 +17,6 @@ IGL_INLINE bool igl::predicates::segment_segment_intersect(
   const Eigen::MatrixBase<DerivedP>& d
 )
 {
-  typename DerivedP::Scalar Scalar;
-  
   auto t1 = igl::predicates::orient2d(a,b,c);
   auto t2 = igl::predicates::orient2d(b,c,d);
   auto t3 = igl::predicates::orient2d(a,b,d);

+ 6 - 5
include/igl/principal_curvature.cpp

@@ -89,17 +89,18 @@ public:
       return 2.0*c()*v + b()*u + e();
     }
 
-    IGL_INLINE double duv(double u, double v)
+    // Why do these take u,v arguments if they're not used?
+    IGL_INLINE double duv(double , double )
     {
       return b();
     }
 
-    IGL_INLINE double duu(double u, double v)
+    IGL_INLINE double duu(double , double )
     {
       return 2.0*a();
     }
 
-    IGL_INLINE double dvv(double u, double v)
+    IGL_INLINE double dvv(double , double )
     {
       return 2.0*c();
     }
@@ -110,7 +111,7 @@ public:
       assert(VV.size() >= 5);
       if (VV.size() < 5)
       {
-        std::cerr << "ASSERT FAILED! fit function requires at least 5 points: Only " << VV.size() << " were given." << std::endl;
+        std::cerr << "IGL_ASSERT FAILED! fit function requires at least 5 points: Only " << VV.size() << " were given." << std::endl;
         exit(0);
       }
 
@@ -350,7 +351,7 @@ IGL_INLINE void CurvatureCalculator::fitQuadric(const Eigen::Vector3d& v, const
   }
   if (points.size() < 5)
   {
-    std::cerr << "ASSERT FAILED! fit function requires at least 5 points: Only " << points.size() << " were given." << std::endl;
+    std::cerr << "IGL_ASSERT FAILED! fit function requires at least 5 points: Only " << points.size() << " were given." << std::endl;
     *q = Quadric(0,0,0,0,0);
   }
   else

Деякі файли не було показано, через те що забагато файлів було змінено