diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polygon_mesh.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polygon_mesh.h index ab837b05c88..7b36d3295ec 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polygon_mesh.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polygon_mesh.h @@ -22,6 +22,7 @@ #endif #include #include +#include #include namespace CGAL { @@ -107,6 +108,11 @@ triangulate_hole_polygon_mesh(PolygonMesh& pmesh, Visitor& visitor, const typename Kernel::FT max_squared_distance) { +#ifdef CGAL_HOLE_FILLING_DO_NOT_USE_CDT2 + CGAL_USE(use_cdt); + CGAL_USE(max_squared_distance); +#endif + typedef Halfedge_around_face_circulator Hedge_around_face_circulator; typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h index 46c3a6904be..ba55ceca89e 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h @@ -729,11 +729,8 @@ namespace Polygon_mesh_processing { using parameters::get_parameter; using parameters::get_parameter_reference; - bool use_cdt = -#ifdef CGAL_HOLE_FILLING_DO_NOT_USE_CDT2 - false; -#else - choose_parameter(get_parameter(np, internal_np::use_2d_constrained_delaunay_triangulation), false); +#ifndef CGAL_HOLE_FILLING_DO_NOT_USE_CDT2 + bool use_cdt = choose_parameter(get_parameter(np, internal_np::use_2d_constrained_delaunay_triangulation), false); #endif bool use_dt3 = #ifdef CGAL_HOLE_FILLING_DO_NOT_USE_DT3