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

Update triangle version to C++ lib with exception support. (#1800)

Co-authored-by: Jérémie Dumas <[email protected]>
Alec Jacobson 4 жил өмнө
parent
commit
2ce04b54fc

+ 1 - 1
cmake/LibiglDownloadExternal.cmake

@@ -157,7 +157,7 @@ endfunction()
 function(igl_download_triangle)
 	igl_download_project(triangle
 		GIT_REPOSITORY https://github.com/libigl/triangle.git
-		GIT_TAG        5a70326574b34d6a51d9eaf6a9f78813657ee108
+		GIT_TAG        4df461c0083e0d768fe42ab41a617070b5acc5ef
 	)
 endfunction()
 

+ 2 - 5
include/igl/triangle/triangulate.cpp

@@ -22,10 +22,7 @@
 #define REAL double
 #define VOID int
 
-extern "C"
-{
 #include <triangle.h>
-}
 
 #undef ANSI_DECLARATORS
 #ifdef IGL_PREVIOUSLY_DEFINED_ANSI_DECLARATORS
@@ -85,9 +82,9 @@ IGL_INLINE void igl::triangle::triangulate(
   using namespace std;
   using namespace Eigen;
 
-  assert( (VM.size() == 0 || V.rows() == VM.size()) && 
+  assert( (VM.size() == 0 || V.rows() == VM.size()) &&
     "Vertex markers must be empty or same size as V");
-  assert( (EM.size() == 0 || E.rows() == EM.size()) && 
+  assert( (EM.size() == 0 || E.rows() == EM.size()) &&
     "Segment markers must be empty or same size as E");
   assert(V.cols() == 2);
   assert(E.size() == 0 || E.cols() == 2);