diff --git a/Mesh_2/include/CGAL/Mesh_2/Refine_edges.h b/Mesh_2/include/CGAL/Mesh_2/Refine_edges.h index 94a585cf134..752a3316e68 100644 --- a/Mesh_2/include/CGAL/Mesh_2/Refine_edges.h +++ b/Mesh_2/include/CGAL/Mesh_2/Refine_edges.h @@ -569,7 +569,7 @@ public: std::cerr << "E"; #endif // @todo Perhaps we should remove destroyed edges too. - // @warning This code has been rewroten! + // @warning This code has been rewritten! Face_circulator fc = tr.incident_faces(v), fcbegin(fc); if( fc == 0 ) return; @@ -586,7 +586,7 @@ public: Face_handle fh; int index = 0; // Avoids a warning. // We know that is_edge must return true, and is_edge will assign something to index - // but the compiler does not so it will issue a maybe uninitialized warning + // but the compiler does not so it will issue a maybe-uninitialized warning CGAL_assume_code(bool is_edge = ) tr.is_edge(va, v, fh, index); diff --git a/Mesh_3/include/CGAL/Mesh_3/C3T3_helpers.h b/Mesh_3/include/CGAL/Mesh_3/C3T3_helpers.h index 2844dfd5a63..f31afa83f6d 100644 --- a/Mesh_3/include/CGAL/Mesh_3/C3T3_helpers.h +++ b/Mesh_3/include/CGAL/Mesh_3/C3T3_helpers.h @@ -3423,6 +3423,7 @@ get_least_square_surface_plane(const Vertex_handle& v, Surface_patch_index patch_index) const { typedef typename C3T3::Triangulation::Triangle Triangle; + typename Gt::Construct_point_3 cp = tr_.geom_traits().construct_point_3_object(); // Get incident facets diff --git a/Periodic_3_mesh_3/include/CGAL/Periodic_3_mesh_3/Protect_edges_sizing_field.h b/Periodic_3_mesh_3/include/CGAL/Periodic_3_mesh_3/Protect_edges_sizing_field.h index ae2995f1041..32e998d3d73 100644 --- a/Periodic_3_mesh_3/include/CGAL/Periodic_3_mesh_3/Protect_edges_sizing_field.h +++ b/Periodic_3_mesh_3/include/CGAL/Periodic_3_mesh_3/Protect_edges_sizing_field.h @@ -10,10 +10,6 @@ // // Author(s) : Stephane Tayeb, Laurent Rineau, Mael Rouxel-Labbé // -//****************************************************************************** -// File Description : -//****************************************************************************** - #ifndef CGAL_PERIODIC_3_MESH_3_PROTECT_EDGES_SIZING_FIELD_H #define CGAL_PERIODIC_3_MESH_3_PROTECT_EDGES_SIZING_FIELD_H diff --git a/Periodic_3_mesh_3/include/CGAL/make_periodic_3_mesh_3.h b/Periodic_3_mesh_3/include/CGAL/make_periodic_3_mesh_3.h index 452152ca7fe..d644bf252a0 100644 --- a/Periodic_3_mesh_3/include/CGAL/make_periodic_3_mesh_3.h +++ b/Periodic_3_mesh_3/include/CGAL/make_periodic_3_mesh_3.h @@ -29,6 +29,7 @@ #include #include #include + #include #include diff --git a/Periodic_3_triangulation_3/include/CGAL/Periodic_3_triangulation_3.h b/Periodic_3_triangulation_3/include/CGAL/Periodic_3_triangulation_3.h index 03cc9488b24..52c54e713f4 100644 --- a/Periodic_3_triangulation_3/include/CGAL/Periodic_3_triangulation_3.h +++ b/Periodic_3_triangulation_3/include/CGAL/Periodic_3_triangulation_3.h @@ -2303,14 +2303,10 @@ inexact_periodic_locate(const Point& p, const Offset& o_p, } CGAL_postcondition(start!=Cell_handle()); - CGAL_assertion(start->neighbor(0)->neighbor( - start->neighbor(0)->index(start))==start); - CGAL_assertion(start->neighbor(1)->neighbor( - start->neighbor(1)->index(start))==start); - CGAL_assertion(start->neighbor(2)->neighbor( - start->neighbor(2)->index(start))==start); - CGAL_assertion(start->neighbor(3)->neighbor( - start->neighbor(3)->index(start))==start); + CGAL_assertion(start->neighbor(0)->neighbor(start->neighbor(0)->index(start)) == start); + CGAL_assertion(start->neighbor(1)->neighbor(start->neighbor(1)->index(start)) == start); + CGAL_assertion(start->neighbor(2)->neighbor(start->neighbor(2)->index(start)) == start); + CGAL_assertion(start->neighbor(3)->neighbor(start->neighbor(3)->index(start)) == start); // We implement the remembering visibility/stochastic walk. @@ -2863,13 +2859,11 @@ template < class Conflict_tester, class Point_hider, class CoverManager > inline typename Periodic_3_triangulation_3::Vertex_handle Periodic_3_triangulation_3::insert_in_conflict(const Point& p, Locate_type lt, Cell_handle c, int li, int lj, - const Conflict_tester& tester, Point_hider& hider, CoverManager& cover_manager) { - CGAL_assertion((domain().xmin() <= p.x()) - && (p.x() < domain().xmax())); - CGAL_assertion((domain().ymin() <= p.y()) - && (p.y() < domain().ymax())); - CGAL_assertion((domain().zmin() <= p.z()) - && (p.z() < domain().zmax())); + const Conflict_tester& tester, Point_hider& hider, CoverManager& cover_manager) +{ + CGAL_assertion((domain().xmin() <= p.x()) && (p.x() < domain().xmax())); + CGAL_assertion((domain().ymin() <= p.y()) && (p.y() < domain().ymax())); + CGAL_assertion((domain().zmin() <= p.z()) && (p.z() < domain().zmax())); if(number_of_vertices() == 0) { Vertex_handle vh = create_initial_triangulation(p); @@ -2889,10 +2883,8 @@ Periodic_3_triangulation_3::insert_in_conflict(const Point& p, vstart = c->vertex(0); else vstart = vvmit->second.first; - CGAL_assertion(virtual_vertices.find(vstart) - == virtual_vertices.end()); - CGAL_assertion(virtual_vertices_reverse.find(vstart) - != virtual_vertices_reverse.end()); + CGAL_assertion(virtual_vertices.find(vstart) == virtual_vertices.end()); + CGAL_assertion(virtual_vertices_reverse.find(vstart) != virtual_vertices_reverse.end()); } CGAL_assertion( number_of_vertices() != 0 ); diff --git a/Periodic_3_triangulation_3/include/CGAL/Periodic_3_triangulation_3/internal/canonicalize_helper.h b/Periodic_3_triangulation_3/include/CGAL/Periodic_3_triangulation_3/internal/canonicalize_helper.h index cf848f988e9..c1d6751558d 100644 --- a/Periodic_3_triangulation_3/include/CGAL/Periodic_3_triangulation_3/internal/canonicalize_helper.h +++ b/Periodic_3_triangulation_3/include/CGAL/Periodic_3_triangulation_3/internal/canonicalize_helper.h @@ -89,10 +89,12 @@ construct_periodic_point_exact(const typename Gt_::Point_3& p, } // Given a point `p` in space, compute its offset `o` with respect -// to the canonical instance and returns (p, o) +// to the canonical instance and returns `(p, o)` template std::pair -construct_periodic_point(const typename Gt_::Point_3& p, bool& encountered_issue, const Gt_& gt) +construct_periodic_point(const typename Gt_::Point_3& p, + bool& encountered_issue, + const Gt_& gt) { typedef Gt_ Geom_traits; typedef typename Geom_traits::Point_3 Point; @@ -120,9 +122,10 @@ construct_periodic_point(const typename Gt_::Point_3& p, bool& encountered_issue // // If this is happening the 'Last_change' enum will break this infinite // loop and return the wrong point and the 'encountered_issue' bool will be - // set to 'true'. An exact version of this function should then be called. + // set to 'true'. An exact version of this function is then be called. - enum Last_change { + enum Last_change + { NO_LAST_CHANGE, INCREASED_X, DECREASED_X, INCREASED_Y, DECREASED_Y, INCREASED_Z, DECREASED_Z }; @@ -301,7 +304,8 @@ snap_to_domain_border(const typename Gt_::Weighted_point_3& p, /// instance of the same bare point that lives inside the base domain template typename Gt_::Point_3 -robust_canonicalize_point(const typename Gt_::Point_3& p, const Gt_& gt) +robust_canonicalize_point(const typename Gt_::Point_3& p, + const Gt_& gt) { typedef Gt_ Geom_traits; typedef typename Geom_traits::Point_3 Bare_point; @@ -352,7 +356,8 @@ robust_canonicalize_point(const typename Gt_::Point_3& p, const Gt_& gt) /// instance of the same weighted point that lives inside the base domain template typename Gt_::Weighted_point_3 -robust_canonicalize_point(const typename Gt_::Weighted_point_3& wp, const Gt_& gt) +robust_canonicalize_point(const typename Gt_::Weighted_point_3& wp, + const Gt_& gt) { typedef Gt_ Geom_traits; typedef typename Geom_traits::Point_3 Bare_point;