Pacified some compiler by removing const

This commit is contained in:
Efi Fogel 2007-11-30 16:52:53 +00:00
parent 1b508fdf96
commit 5007809e70
2 changed files with 31 additions and 38 deletions

View File

@ -752,10 +752,8 @@ _is_to_left_impl(const Point_2& p, Halfedge_handle he, Tag_true) const
// Check if the given point lies completely to the right of the given egde. // Check if the given point lies completely to the right of the given egde.
// //
template<class Arrangement, class ZoneVisitor> template<class Arrangement, class ZoneVisitor>
bool Arrangement_zone_2<Arrangement,ZoneVisitor>::_is_to_right_impl bool Arrangement_zone_2<Arrangement,ZoneVisitor>::
(const Point_2& p, _is_to_right_impl(const Point_2& p, Halfedge_handle he, Tag_true) const
Halfedge_const_handle he,
Tag_true ) const
{ {
// Check the boundary conditions of the maximal end of the curve associated // Check the boundary conditions of the maximal end of the curve associated
// with the given halfedge. // with the given halfedge.

View File

@ -68,6 +68,10 @@ public:
typedef typename Geometry_traits_2::Point_2 Point_2; typedef typename Geometry_traits_2::Point_2 Point_2;
typedef typename Geometry_traits_2::X_monotone_curve_2 X_monotone_curve_2; typedef typename Geometry_traits_2::X_monotone_curve_2 X_monotone_curve_2;
typedef typename Geometry_traits_2::Has_boundary_category
Has_boundary_category;
typedef typename Geometry_traits_2::Boundary_category
Boundary_category;
protected: protected:
@ -179,10 +183,10 @@ public:
// Set the curve and check whether its left end has boundary conditions. // Set the curve and check whether its left end has boundary conditions.
cv = _cv; cv = _cv;
const Boundary_type bx1 = geom_traits->boundary_in_x_2_object()(cv, const Boundary_type bx1 =
ARR_MIN_END); geom_traits->boundary_in_x_2_object()(cv, ARR_MIN_END);
const Boundary_type by1 = geom_traits->boundary_in_y_2_object()(cv, const Boundary_type by1 =
ARR_MIN_END); geom_traits->boundary_in_y_2_object()(cv, ARR_MIN_END);
if (bx1 == NO_BOUNDARY && by1 == NO_BOUNDARY) if (bx1 == NO_BOUNDARY && by1 == NO_BOUNDARY)
{ {
@ -210,10 +214,10 @@ public:
} }
// Check the boundary conditions of th right curve end. // Check the boundary conditions of th right curve end.
const Boundary_type bx2 = geom_traits->boundary_in_x_2_object()(cv, const Boundary_type bx2 =
ARR_MAX_END); geom_traits->boundary_in_x_2_object()(cv, ARR_MAX_END);
const Boundary_type by2 = geom_traits->boundary_in_y_2_object()(cv, const Boundary_type by2 =
ARR_MAX_END); geom_traits->boundary_in_y_2_object()(cv, ARR_MAX_END);
if (bx2 != MINUS_INFINITY && bx2 != PLUS_INFINITY && if (bx2 != MINUS_INFINITY && bx2 != PLUS_INFINITY &&
by2 != MINUS_INFINITY && by2 != PLUS_INFINITY) by2 != MINUS_INFINITY && by2 != PLUS_INFINITY)
@ -332,9 +336,7 @@ private:
*/ */
bool _is_to_left(const Point_2& p, Halfedge_handle he) const bool _is_to_left(const Point_2& p, Halfedge_handle he) const
{ {
return (_is_to_left_impl(p, he, return (_is_to_left_impl(p, he, Has_boundary_category()));
typename
Geometry_traits_2::Has_boundary_category()));
} }
bool _is_to_left_impl(const Point_2& p, Halfedge_handle he, Tag_false) const bool _is_to_left_impl(const Point_2& p, Halfedge_handle he, Tag_false) const
@ -356,17 +358,12 @@ private:
* \pre he is not a fictitious edge. * \pre he is not a fictitious edge.
* \return Whether p lies entirely to the right of the edge. * \return Whether p lies entirely to the right of the edge.
*/ */
bool _is_to_right (const Point_2& p, bool _is_to_right(const Point_2& p, Halfedge_handle he) const
Halfedge_const_handle he) const
{ {
return (_is_to_right_impl return (_is_to_right_impl(p, he, Has_boundary_category()));
(p, he,
typename Geometry_traits_2::Has_boundary_category()));
} }
bool _is_to_right_impl (const Point_2& p, bool _is_to_right_impl(const Point_2& p, Halfedge_handle he, Tag_false) const
Halfedge_const_handle he,
Tag_false ) const
{ {
return ((he->direction() == ARR_LEFT_TO_RIGHT && return ((he->direction() == ARR_LEFT_TO_RIGHT &&
geom_traits->compare_xy_2_object() geom_traits->compare_xy_2_object()
@ -376,9 +373,7 @@ private:
(p, he->source()->point()) == LARGER)); (p, he->source()->point()) == LARGER));
} }
bool _is_to_right_impl (const Point_2& p, bool _is_to_right_impl(const Point_2& p, Halfedge_handle he, Tag_true) const;
Halfedge_const_handle he,
Tag_true ) const;
/*! /*!
* Compute the (lexicographically) leftmost intersection of the query * Compute the (lexicographically) leftmost intersection of the query