From 91bca286d3a0b57eb4e41f6fb76aebad1bb22e5c Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Wed, 19 Aug 2015 17:37:46 +0200 Subject: [PATCH] Fix warnings with CGAL_USE All those variables were unused only if CGAL_NDEBUG was defined. CGAL_USE can solve that. --- .../include/CGAL/General_polygon_set_on_surface_2.h | 1 + .../include/CGAL/Min_ellipse_2/Optimisation_ellipse_2.h | 3 ++- Envelope_3/include/CGAL/Env_triangle_traits_3.h | 1 + .../include/CGAL/Envelope_3/Envelope_element_visitor_3.h | 2 +- .../L1_Voronoi_diagram_2/include/CGAL/L1_voronoi_traits_2.h | 2 +- Nef_S2/include/CGAL/Nef_S2/SM_triangulator.h | 4 ++-- 6 files changed, 8 insertions(+), 5 deletions(-) diff --git a/Boolean_set_operations_2/include/CGAL/General_polygon_set_on_surface_2.h b/Boolean_set_operations_2/include/CGAL/General_polygon_set_on_surface_2.h index d9e9a709c07..de229604b99 100644 --- a/Boolean_set_operations_2/include/CGAL/General_polygon_set_on_surface_2.h +++ b/Boolean_set_operations_2/include/CGAL/General_polygon_set_on_surface_2.h @@ -43,6 +43,7 @@ namespace Boolean_set_operation_2_internal inline static void is_valid(const Polygon& p, const Traits& t) { CGAL_precondition(is_valid_unknown_polygon(p, t)); + CGAL_USE(p); CGAL_USE(t); } }; } diff --git a/Bounding_volumes/include/CGAL/Min_ellipse_2/Optimisation_ellipse_2.h b/Bounding_volumes/include/CGAL/Min_ellipse_2/Optimisation_ellipse_2.h index 4dee14964e2..efa58d9b992 100644 --- a/Bounding_volumes/include/CGAL/Min_ellipse_2/Optimisation_ellipse_2.h +++ b/Bounding_volumes/include/CGAL/Min_ellipse_2/Optimisation_ellipse_2.h @@ -136,7 +136,7 @@ class Optimisation_ellipse_2 { set( const Point& p, const Point& q) { n_boundary_points = 2; - CGAL_optimisation_precondition(boundary_point1 == p); + CGAL_optimisation_precondition(boundary_point1 == p); CGAL_USE(p); boundary_point2 = q; } @@ -224,6 +224,7 @@ class Optimisation_ellipse_2 { CGAL_optimisation_precondition(boundary_point2 == p2); CGAL_optimisation_precondition(boundary_point3 == p3); CGAL_optimisation_precondition(boundary_point4 == p4); + CGAL_USE(p1); CGAL_USE(p2); CGAL_USE(p3); CGAL_USE(p4); boundary_point5 = p5; } diff --git a/Envelope_3/include/CGAL/Env_triangle_traits_3.h b/Envelope_3/include/CGAL/Env_triangle_traits_3.h index 17cf063cc6d..1b0340a32dc 100644 --- a/Envelope_3/include/CGAL/Env_triangle_traits_3.h +++ b/Envelope_3/include/CGAL/Env_triangle_traits_3.h @@ -1172,6 +1172,7 @@ public: CGAL_precondition( triangle.plane() == plane || triangle.plane() == plane.opposite()); CGAL_precondition( k.has_on_3_object()(plane, point) ); + CGAL_USE(plane); // if the point is inside the triangle, then the point is the intersection // otherwise there is no intersection diff --git a/Envelope_3/include/CGAL/Envelope_3/Envelope_element_visitor_3.h b/Envelope_3/include/CGAL/Envelope_3/Envelope_element_visitor_3.h index 6de1dfd8c3f..19c67c33046 100644 --- a/Envelope_3/include/CGAL/Envelope_3/Envelope_element_visitor_3.h +++ b/Envelope_3/include/CGAL/Envelope_3/Envelope_element_visitor_3.h @@ -2248,7 +2248,7 @@ protected: // big_e1 is directed at big_v, as e1 is directed at split_v - // these are supposed to be mapped CGAL_assertion(map_halfedges.is_defined(e1) && - map_halfedges[e1] == big_e1); + map_halfedges[e1] == big_e1); CGAL_USE(e1); // should update the mapping of the second halfedge map_halfedges[e2] = big_e2; map_halfedges[e2->twin()] = big_e2->twin(); diff --git a/GraphicsView/demo/L1_Voronoi_diagram_2/include/CGAL/L1_voronoi_traits_2.h b/GraphicsView/demo/L1_Voronoi_diagram_2/include/CGAL/L1_voronoi_traits_2.h index 37efaa75766..bc583aedcd4 100644 --- a/GraphicsView/demo/L1_Voronoi_diagram_2/include/CGAL/L1_voronoi_traits_2.h +++ b/GraphicsView/demo/L1_Voronoi_diagram_2/include/CGAL/L1_voronoi_traits_2.h @@ -201,7 +201,7 @@ public: Comparison_result operator()(const Xy_monotone_surface_3& h1, const Xy_monotone_surface_3& h2) const { // should happen only if the points are equal. - CGAL_assertion(h1 == h2); + CGAL_assertion(h1 == h2); CGAL_USE(h1); CGAL_USE(h2); return EQUAL; } }; diff --git a/Nef_S2/include/CGAL/Nef_S2/SM_triangulator.h b/Nef_S2/include/CGAL/Nef_S2/SM_triangulator.h index 824eb5f1a3e..940598fa833 100644 --- a/Nef_S2/include/CGAL/Nef_S2/SM_triangulator.h +++ b/Nef_S2/include/CGAL/Nef_S2/SM_triangulator.h @@ -304,10 +304,10 @@ public: { return ginfo(e).forw_; } void assert_equal_marks(SVertex_handle v1, SVertex_handle v2) const - { CGAL_assertion(v1->mark()==v2->mark()); } + { CGAL_assertion(v1->mark()==v2->mark()); CGAL_USE(v1); CGAL_USE(v2); } void assert_equal_marks(SHalfedge_handle e1, SHalfedge_handle e2) const - { CGAL_assertion(e1->mark()==e2->mark()); } + { CGAL_assertion(e1->mark()==e2->mark()); CGAL_USE(e1); CGAL_USE(e2); } Sphere_segment segment(const Explorer* , SHalfedge_const_handle e) const