diff --git a/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/discrete_authalic.cpp b/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/discrete_authalic.cpp index ed4eb5ef07f..a93852c0043 100644 --- a/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/discrete_authalic.cpp +++ b/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/discrete_authalic.cpp @@ -27,12 +27,12 @@ typedef boost::graph_traits::face_descriptor face_descriptor; namespace SMP = CGAL::Surface_mesh_parameterization; -int main(int argc, char * argv[]) +int main(int argc, char** argv) { std::ifstream in((argc>1) ? argv[1] : "data/three_peaks.off"); if(!in) { std::cerr << "Problem loading the input data" << std::endl; - return 1; + return EXIT_FAILURE; } SurfaceMesh sm; @@ -52,11 +52,11 @@ int main(int argc, char * argv[]) if(err != SMP::OK) { std::cerr << "Error: " << SMP::get_error_message(err) << std::endl; - return 1; + return EXIT_FAILURE; } std::ofstream out("result.off"); SMP::IO::output_uvmap_to_off(sm, bhd, uv_map, out); - return 0; + return EXIT_SUCCESS; } diff --git a/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/lscm.cpp b/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/lscm.cpp index 1b0675c8a8d..fc95fc9a3a0 100644 --- a/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/lscm.cpp +++ b/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/lscm.cpp @@ -37,12 +37,12 @@ typedef boost::graph_traits::face_descriptor face_descriptor; namespace SMP = CGAL::Surface_mesh_parameterization; -int main(int argc, char * argv[]) +int main(int argc, char** argv) { std::ifstream in_mesh((argc>1) ? argv[1] : "data/lion.off"); if(!in_mesh){ std::cerr << "Error: problem loading the input data" << std::endl; - return 1; + return EXIT_FAILURE; } SurfaceMesh sm; @@ -97,6 +97,6 @@ int main(int argc, char * argv[]) std::ofstream out("result.off"); SMP::IO::output_uvmap_to_off(mesh, bhd, uv_pm, out); - return 0; + return EXIT_SUCCESS; } diff --git a/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/orbifold.cpp b/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/orbifold.cpp index 84296d8ab87..67c095bcaf9 100644 --- a/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/orbifold.cpp +++ b/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/orbifold.cpp @@ -41,7 +41,7 @@ typedef SurfaceMesh::Property_map UV_pmap; namespace SMP = CGAL::Surface_mesh_parameterization; -int main(int argc, char * argv[]) +int main(int argc, char** argv) { CGAL::Timer task_timer; task_timer.start(); @@ -50,7 +50,7 @@ int main(int argc, char * argv[]) std::ifstream in_mesh(mesh_filename); if(!in_mesh) { std::cerr << "Error: problem loading the input data" << std::endl; - return 1; + return EXIT_FAILURE; } SurfaceMesh sm; // underlying mesh of the seam mesh @@ -120,4 +120,5 @@ int main(int argc, char * argv[]) parameterizer.parameterize(mesh, bhd, cmap, uvmap, vimap); std::cout << "Finished in " << task_timer.time() << " seconds" << std::endl; + return EXIT_SUCCESS; } diff --git a/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/seam_Polyhedron_3.cpp b/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/seam_Polyhedron_3.cpp index 21308c43e7f..b101786e0a6 100644 --- a/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/seam_Polyhedron_3.cpp +++ b/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/seam_Polyhedron_3.cpp @@ -37,12 +37,12 @@ typedef boost::graph_traits::face_descriptor face_descriptor; namespace SMP = CGAL::Surface_mesh_parameterization; -int main(int argc, char * argv[]) +int main(int argc, char** argv) { std::ifstream in_mesh((argc>1)?argv[1]:"data/lion.off"); if(!in_mesh) { std::cerr << "Error: problem loading the input data" << std::endl; - return 1; + return EXIT_FAILURE; } PolyMesh sm; @@ -77,6 +77,6 @@ int main(int argc, char * argv[]) std::ofstream out("result.off"); SMP::IO::output_uvmap_to_off(mesh, bhd, uv_pm, out); - return 0; + return EXIT_SUCCESS; } diff --git a/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/simple_parameterization.cpp b/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/simple_parameterization.cpp index 890503c46a2..a5aeba4f2f3 100644 --- a/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/simple_parameterization.cpp +++ b/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/simple_parameterization.cpp @@ -21,12 +21,12 @@ typedef boost::graph_traits::face_descriptor face_descriptor; namespace SMP = CGAL::Surface_mesh_parameterization; -int main(int argc, char * argv[]) +int main(int argc, char** argv) { std::ifstream in((argc>1) ? argv[1] : "data/nefertiti.off"); if(!in) { std::cerr << "Problem loading the input data" << std::endl; - return 1; + return EXIT_FAILURE; } SurfaceMesh sm; @@ -44,5 +44,5 @@ int main(int argc, char * argv[]) std::ofstream out("result.off"); SMP::IO::output_uvmap_to_off(sm, bhd, uv_map, out); - return 0; + return EXIT_SUCCESS; } diff --git a/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/square_border_parameterizer.cpp b/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/square_border_parameterizer.cpp index 8cc315c599e..9e64c7db2fd 100644 --- a/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/square_border_parameterizer.cpp +++ b/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/square_border_parameterizer.cpp @@ -97,7 +97,7 @@ bool read_vertices(const PolyMesh& mesh, return true; } -int main(int argc, char * argv[]) +int main(int argc, char** argv) { std::ifstream in((argc>1) ? argv[1] : "data/nefertiti.off"); if(!in){ @@ -118,7 +118,7 @@ int main(int argc, char * argv[]) Vd_array vda; if(!read_vertices(sm, filename, vda)) { std::cerr << "Error: problem loading the square corners" << std::endl; - return 1; + return EXIT_FAILURE; } typedef SMP::Square_border_uniform_parameterizer_3 Border_parameterizer; @@ -138,5 +138,5 @@ int main(int argc, char * argv[]) std::ofstream out("result.off"); SMP::IO::output_uvmap_to_off(sm, bhd, uv_map, out); - return 0; + return EXIT_SUCCESS; } diff --git a/Surface_mesh_parameterization/test/Surface_mesh_parameterization/extensive_parameterization_test.cpp b/Surface_mesh_parameterization/test/Surface_mesh_parameterization/extensive_parameterization_test.cpp index 9ff1649fe82..aaaf0a45e5e 100644 --- a/Surface_mesh_parameterization/test/Surface_mesh_parameterization/extensive_parameterization_test.cpp +++ b/Surface_mesh_parameterization/test/Surface_mesh_parameterization/extensive_parameterization_test.cpp @@ -92,7 +92,7 @@ int main(int, char**) in >> pm; if(!in || num_vertices(pm) == 0) { std::cerr << "Problem loading the input data" << std::endl; - return 1; + return EXIT_FAILURE; } PM_halfedge_descriptor hd = CGAL::Polygon_mesh_processing::longest_border(pm).first; @@ -108,7 +108,7 @@ int main(int, char**) if(status != SMP::OK) { std::cout << "Encountered a problem: " << status << std::endl; - return 1; + return EXIT_FAILURE; } else { std::cout << "Parameterized with MVC (POLY)!" << std::endl; @@ -129,7 +129,7 @@ int main(int, char**) in >> pm; if(!in || num_vertices(pm) == 0) { std::cerr << "Problem loading the input data" << std::endl; - return 1; + return EXIT_FAILURE; } PM_halfedge_descriptor hd = CGAL::Polygon_mesh_processing::longest_border(pm).first; @@ -162,7 +162,7 @@ int main(int, char**) if(status != SMP::OK) { std::cout << "Encountered a problem: " << status << std::endl; - return 1; + return EXIT_FAILURE; } else { std::cout << "Parameterized with ARAP (POLY)!" << std::endl; @@ -183,7 +183,7 @@ int main(int, char**) in >> sm; if(!in || num_vertices(sm) == 0) { std::cerr << "Problem loading the input data" << std::endl; - return 1; + return EXIT_FAILURE; } SM_halfedge_descriptor hd = CGAL::Polygon_mesh_processing::longest_border(sm).first; @@ -214,7 +214,7 @@ int main(int, char**) if(status != SMP::OK) { std::cout << "Encountered a problem: " << status << std::endl; - return 1; + return EXIT_FAILURE; } else { std::cout << "Parameterized with Barycentric (SM)!" << std::endl; @@ -235,7 +235,7 @@ int main(int, char**) in >> sm; if(!in || num_vertices(sm) == 0) { std::cerr << "Problem loading the input data" << std::endl; - return 1; + return EXIT_FAILURE; } // halfedge on the longest border @@ -269,7 +269,7 @@ int main(int, char**) SMP::Error_code status = parameterizer.parameterize(sm, hd, uv_pm, vipm, vpm); if(status != SMP::OK) { std::cout << "Encountered a problem: " << status << std::endl; - return 1; + return EXIT_FAILURE; } else { std::cout << "Parameterized with ARAP (SM)!" << std::endl; @@ -286,7 +286,7 @@ int main(int, char**) in >> pm; if(!in || num_vertices(pm) == 0) { std::cerr << "Problem loading the input data" << std::endl; - return 1; + return EXIT_FAILURE; } const char* selection = "data/fandisk.dcm.selection.txt"; @@ -330,7 +330,7 @@ int main(int, char**) if(status != SMP::OK) { std::cout << "Encountered a problem: " << status << std::endl; - return 1; + return EXIT_FAILURE; } else { std::cout << "Parameterized with DCM (SEAM POLY)!" << std::endl; @@ -351,7 +351,7 @@ int main(int, char**) in >> sm; if(!in || num_vertices(sm) == 0) { std::cerr << "Problem loading the input data" << std::endl; - return 1; + return EXIT_FAILURE; } const char* selection = "data/bear.dac.selection.txt"; @@ -395,7 +395,7 @@ int main(int, char**) SMP::Error_code status = parameterizer.parameterize(mesh, hd, uv_pm, vipm, vpm); if(status != SMP::OK) { std::cout << "Encountered a problem: " << status << std::endl; - return 1; + return EXIT_FAILURE; } else { std::cout << "Parameterized with DAC (SEAM SM)!" << std::endl; @@ -413,7 +413,7 @@ int main(int, char**) in >> sm; if(!in || num_vertices(sm) == 0) { std::cerr << "Problem loading the input data" << std::endl; - return 1; + return EXIT_FAILURE; } const char* cone_filename = "data/fandisk.orbifold.selection.txt"; @@ -471,7 +471,7 @@ int main(int, char**) SMP::Error_code status = parameterizer.parameterize(mesh, hd, cmap, uvmap, vimap); if(status != SMP::OK) { std::cout << "Encountered a problem: " << status << std::endl; - return 1; + return EXIT_FAILURE; } else { std::cout << "Parameterized with Orbifold (SEAM SM)!" << std::endl; @@ -481,5 +481,5 @@ int main(int, char**) std::cout << "Done!" << std::endl; - return 0; + return EXIT_SUCCESS; }