diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_lm_generator_base.h b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_lm_generator_base.h index 1b07127ac0e..c03d3efa18e 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_lm_generator_base.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_lm_generator_base.h @@ -151,7 +151,7 @@ public: * arrangement (a vertex, halfedge, or face handle). * \return The nearest landmark point. */ - virtual Point_2 closest_landmark (Point_2 p, Object &obj) + virtual Point_2 closest_landmark (const Point_2 p, Object &obj) { CGAL_assertion(updated); return (nn.find_nearest_neighbor(p, obj)); diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_active_trapezoid.h b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_active_trapezoid.h index 004cc5cac82..2eb41f82b00 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_active_trapezoid.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_active_trapezoid.h @@ -51,42 +51,42 @@ namespace CGAL { * when one of the four sides is on the parameter space boundary. * Each trapezoid has at most four neighbouring trapezoids. */ -template +template class Td_active_trapezoid : public Handle { public: //type of traits class - typedef Td_traits_ Traits; + typedef Td_traits_ Traits; //type of point (Point_2) - typedef typename Traits::Point Point; + typedef typename Traits::Point Point; //type of X_monotone_curve_2 - typedef typename Traits::X_monotone_curve_2 X_monotone_curve_2; + typedef typename Traits::X_monotone_curve_2 X_monotone_curve_2; //type of Curve_end - typedef typename Traits::Curve_end Curve_end; + typedef typename Traits::Curve_end Curve_end; //type of Halfedge_const_handle (trapezoid edge) - typedef typename Traits::Halfedge_const_handle Halfedge_const_handle; + typedef typename Traits::Halfedge_const_handle Halfedge_const_handle; //type of Vertex_const_handle (trapezoid vertex) - typedef typename Traits::Vertex_const_handle Vertex_const_handle; + typedef typename Traits::Vertex_const_handle Vertex_const_handle; //type of Td_active_trapezoid (Self) - typedef typename Traits::Td_active_trapezoid Self; + typedef typename Traits::Td_active_trapezoid Self; - typedef typename Traits::Td_map_item Td_map_item; + typedef typename Traits::Td_map_item Td_map_item; //type of Trapezoidal decomposition - typedef Trapezoidal_decomposition_2 TD; + typedef Trapezoidal_decomposition_2 TD; //type of In face iterator - typedef typename TD::In_face_iterator In_face_iterator; + typedef typename TD::In_face_iterator In_face_iterator; //type of Trapezoidal map search structure - typedef typename TD::Dag_node Dag_node; + typedef typename TD::Dag_node Dag_node; //friend class declarations: @@ -128,8 +128,9 @@ public: const Td_map_item& _rb, const Td_map_item& _rt, Dag_node* _p_node) - : left_v(_left_v),right_v(_right_v),bottom_he(_bottom_he),top_he(_top_he), - lb(_lb),lt(_lt),rb(_rb),rt(_rt),p_node(_p_node) + : left_v(_left_v), right_v(_right_v), + bottom_he(_bottom_he), top_he(_top_he), + lb(_lb), lt(_lt), rb(_rb), rt(_rt), p_node(_p_node) { } ~Data() { } @@ -150,24 +151,23 @@ public: Data* ptr() const { return (Data*)(PTR); } - - - #ifndef CGAL_TD_DEBUG #ifdef CGAL_PM_FRIEND_CLASS - protected: +protected: #else - public: // workaround +public: // workaround #endif #else //CGAL_TD_DEBUG - public: +public: #endif //CGAL_TD_DEBUG //Dag_node* m_dag_node; //pointer to the search structure (DAG) node /*! Initialize the trapezoid's neighbours. */ - inline void init_neighbours(boost::optional lb, boost::optional lt, - boost::optional rb, boost::optional rt) + inline void init_neighbours(boost::optional lb, + boost::optional lt, + boost::optional rb, + boost::optional rt) { set_lb((lb) ? *lb : Td_map_item(0)); set_lt((lt) ? *lt : Td_map_item(0)); @@ -185,27 +185,19 @@ public: // // CGAL_assertion(!p || **p == *this); // -//#endif - +//#endif } /*! Set the trapezoid's left (Vertex_const_handle). */ - inline void set_left(Vertex_const_handle v) - { - ptr()->left_v = v; - } + inline void set_left(Vertex_const_handle v) { ptr()->left_v = v; } /*! Set the trapezoid's right (Vertex_const_handle). */ - inline void set_right(Vertex_const_handle v) - { - ptr()->right_v = v; - } + inline void set_right(Vertex_const_handle v) { ptr()->right_v = v; } /*! Set the trapezoid's bottom (Halfedge_const_handle). */ inline void set_bottom(Halfedge_const_handle he) { - if (!is_on_bottom_boundary() && - bottom()->direction() != he->direction()) + if (!is_on_bottom_boundary() && (bottom()->direction() != he->direction())) { ptr()->bottom_he = he->twin(); } @@ -218,8 +210,7 @@ public: /*! Set the trapezoid's top (Halfedge_const_handle). */ inline void set_top(Halfedge_const_handle he) { - if (!is_on_top_boundary() && - top()->direction() != he->direction()) + if (!is_on_top_boundary() && (top()->direction() != he->direction())) { ptr()->top_he = he->twin(); } @@ -252,27 +243,28 @@ public: { //define the initial trapezoid: left, right, btm, top are at infinity. // has no neighbours - PTR = new Data - (Traits::empty_vtx_handle(), - Traits::empty_vtx_handle(), - Traits::empty_he_handle(), - Traits::empty_he_handle(), - Td_map_item(0), Td_map_item(0) , Td_map_item(0) , Td_map_item(0), NULL); + PTR = new Data(Traits::empty_vtx_handle(), + Traits::empty_vtx_handle(), + Traits::empty_he_handle(), + Traits::empty_he_handle(), + Td_map_item(0), Td_map_item(0) , + Td_map_item(0), Td_map_item(0), NULL); //m_dag_node = 0; } /*! Constructor given Vertex & Halfedge handles. */ Td_active_trapezoid (Vertex_const_handle l, Vertex_const_handle r, - Halfedge_const_handle b, Halfedge_const_handle t, - boost::optional lb = boost::none, - boost::optional lt = boost::none, - boost::optional rb = boost::none, - boost::optional rt = boost::none, - Dag_node* node = 0) + Halfedge_const_handle b, Halfedge_const_handle t, + boost::optional lb = boost::none, + boost::optional lt = boost::none, + boost::optional rb = boost::none, + boost::optional rt = boost::none, + Dag_node* node = 0) { - PTR = new Data (l, r, b, t, (lb) ? *lb : Td_map_item(0), (lt) ? *lt : Td_map_item(0), - (rb) ? *rb : Td_map_item(0), (rt) ? *rt : Td_map_item(0), node); + PTR = new Data(l, r, b, t, (lb) ? *lb : Td_map_item(0), + (lt) ? *lt : Td_map_item(0), (rb) ? *rb : Td_map_item(0), + (rt) ? *rt : Td_map_item(0), node); //m_dag_node = node; } @@ -292,20 +284,20 @@ public: * operator= should not copy m_dag_node (or otherwise update * Dag_node::replace) */ - inline Self& operator= (const Self& t2) + inline Self& operator=(const Self& t2) { - Handle::operator=(t2); - return *this; + Handle::operator=(t2); + return *this; } /*! Operator==. */ - inline bool operator== (const Self& t2) const + inline bool operator==(const Self& t2) const { return (ptr() == t2.ptr()); } /*! Operator!=. */ - inline bool operator!= (const Self& t2) const + inline bool operator!=(const Self& t2) const { return !(operator==(t2)); } @@ -316,99 +308,70 @@ public: /// \name Access methods. //@{ - inline Self& self() - { - return *this; - } + inline Self& self() { return *this; } - inline const Self& self() const - { - return *this; - } + inline const Self& self() const { return *this; } /*! Access the trapezoid id (PTR). */ - inline unsigned long id() const - { - return (unsigned long) PTR; - } + inline unsigned long id() const { return (unsigned long) PTR; } /*! Access trapezoid left. * filters out the infinite case which returns predefined dummy values */ - inline Vertex_const_handle left() const - { - return ptr()->left_v; - } + inline Vertex_const_handle left() const { return ptr()->left_v; } /*! Access trapezoid right. * filters out the infinite case which returns predefined dummy values */ - inline Vertex_const_handle right () const - { - return ptr()->right_v; - } + inline Vertex_const_handle right() const { return ptr()->right_v; } /*! Access trapezoid bottom. * filters out the infinite case which returns predefined dummy values */ - inline Halfedge_const_handle bottom () const - { - return ptr()->bottom_he; - } + inline Halfedge_const_handle bottom() const { return ptr()->bottom_he; } /*! Access trapezoid top. * filters out the infinite case which returns predefined dummy values */ - inline Halfedge_const_handle top () const - { - return ptr()->top_he; - } + inline Halfedge_const_handle top() const { return ptr()->top_he; } /*! Access is on left boundary. */ inline bool is_on_left_boundary() const - { - return (left() == Traits::empty_vtx_handle()); - } + { return (left() == Traits::empty_vtx_handle()); } /*! Access is on right boundary. */ inline bool is_on_right_boundary() const - { - return (right() == Traits::empty_vtx_handle()); - } + { return (right() == Traits::empty_vtx_handle()); } /*! Access is on bottom boundary. */ inline bool is_on_bottom_boundary() const - { - return (bottom() == Traits::empty_he_handle()); - } + { return (bottom() == Traits::empty_he_handle()); } /*! Access is on top boundary. */ inline bool is_on_top_boundary() const - { - return (top() == Traits::empty_he_handle()); - } + { return (top() == Traits::empty_he_handle()); } /*! Access is on at least one boundary. */ inline bool is_on_boundaries() const { return (is_on_left_boundary() || is_on_right_boundary() || - is_on_bottom_boundary() || is_on_top_boundary() ); + is_on_bottom_boundary() || is_on_top_boundary()); } /*! Access left bottom neighbour. */ - Td_map_item& lb() const { return ptr()->lb; } + Td_map_item& lb() const { return ptr()->lb; } /*! Access left top neighbour. */ - Td_map_item& lt() const { return ptr()->lt; } + Td_map_item& lt() const { return ptr()->lt; } /*! Access right bottom neighbour. */ - Td_map_item& rb() const { return ptr()->rb; } + Td_map_item& rb() const { return ptr()->rb; } /*! Access right top neighbour. */ - Td_map_item& rt() const { return ptr()->rt; } + Td_map_item& rt() const { return ptr()->rt; } /*! Access DAG node. */ - Dag_node* dag_node() const {return ptr()->p_node; } + Dag_node* dag_node() const {return ptr()->p_node; } void clear_neighbors() { @@ -459,8 +422,6 @@ public: } CGAL_assertion(is_on_right_boundary() == right.is_on_right_boundary()); } - - }; } //namespace CGAL diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Trapezoidal_decomposition_2_misc.h b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Trapezoidal_decomposition_2_misc.h index 76a6a5fe323..f2e47dbbb4b 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Trapezoidal_decomposition_2_misc.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Trapezoidal_decomposition_2_misc.h @@ -51,7 +51,7 @@ #define CGAL_TD_DEFAULT_SIZE_THRESHOLD 12 #ifndef _MSC_VER -#if !defined __GNUC__ || __GNUC__>2 || __GNUC__==2 && __GNUC_MINOR__>=95 +#if !defined __GNUC__ || __GNUC__> 3 || ((__GNUC__== 3) && (__GNUC_MINOR__> 4)) #define CGAL_PM_FRIEND_CLASS #endif #endif diff --git a/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arr_traits_adaptor_2.h b/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arr_traits_adaptor_2.h index ca6d9194b21..d01efa3c953 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arr_traits_adaptor_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arr_traits_adaptor_2.h @@ -1135,8 +1135,8 @@ public: } Comparison_result comp_x_on_bnd(const Point_2&, - const X_monotone_curve_2& xcv, - Arr_curve_end ce, + const X_monotone_curve_2& /* xcv */, + Arr_curve_end /* ce */, Arr_use_dummy_tag) const { CGAL_error(); @@ -1153,10 +1153,10 @@ public: return m_base->compare_x_on_boundary_2_object()(xcv1, ce1, xcv2, ce2); } - Comparison_result comp_x_on_bnd(const X_monotone_curve_2& - xcv1, Arr_curve_end ce1, - const X_monotone_curve_2& xcv2, - Arr_curve_end ce2, + Comparison_result comp_x_on_bnd(const X_monotone_curve_2& /* xcv1 */, + Arr_curve_end /* ce1 */, + const X_monotone_curve_2& /* xcv2 */, + Arr_curve_end /* ce2 */, Arr_use_dummy_tag) const { CGAL_error();