Added missing const

This commit is contained in:
Efi Fogel 2018-04-07 16:03:32 +03:00
parent fb0d16577e
commit 5b35b2fb6e
1 changed files with 58 additions and 58 deletions

View File

@ -43,7 +43,7 @@
namespace CGAL {
/*! \class
/*! \class
* A model of the ArrangementTraits_2 concept that counts the methods invoked.
*/
template <class Base_traits>
@ -88,7 +88,7 @@ public:
COMPARE_X_ON_BOUNDARY_POINT_CURVE_END_OP,
COMPARE_X_ON_BOUNDARY_CURVE_ENDS_OP,
COMPARE_X_NEAR_BOUNDARY_OP,
NUMBER_OF_OPERATIONS
};
@ -103,69 +103,69 @@ public:
}
/*! Construct copy */
Arr_counting_traits_2(Arr_counting_traits_2& other) : Base(other)
Arr_counting_traits_2(const Arr_counting_traits_2& other) : Base(other)
{
clear_counters();
increment();
}
/*! Obtain the counter of the given operation */
unsigned int count(Operation_id id) const
{ return m_counters[id]; }
unsigned int count_compare_x() const
{ return m_counters[COMPARE_X_OP]; }
unsigned int count_compare_xy() const
{ return m_counters[COMPARE_XY_OP]; }
unsigned int count_construct_min_vertex() const
{ return m_counters[CONSTRUCT_MIN_VERTEX_OP]; }
unsigned int count_construct_max_vertex() const
{ return m_counters[CONSTRUCT_MAX_VERTEX_OP]; }
unsigned int count_is_vertical() const
{ return m_counters[IS_VERTICAL_OP]; }
unsigned int count_compare_y_at_x() const
{ return m_counters[COMPARE_Y_AT_X_OP]; }
unsigned int count_equal_points() const
{ return m_counters[EQUAL_POINTS_OP]; }
unsigned int count_equal_curves() const
{ return m_counters[EQUAL_CURVES_OP]; }
unsigned int count_compare_y_at_x_left() const
{ return m_counters[COMPARE_Y_AT_X_LEFT_OP]; }
unsigned int count_compare_y_at_x_right() const
{ return m_counters[COMPARE_Y_AT_X_RIGHT_OP]; }
unsigned int count_make_x_monotone() const
{ return m_counters[MAKE_X_MONOTONE_OP]; }
unsigned int count_split() const
{ return m_counters[SPLIT_OP]; }
unsigned int count_intersect() const
{ return m_counters[INTERSECT_OP]; }
unsigned int count_are_mergeable() const
{ return m_counters[ARE_MERGEABLE_OP]; }
unsigned int count_merge() const
{ return m_counters[MERGE_OP]; }
unsigned int count_construct_opposite() const
{ return m_counters[CONSTRUCT_OPPOSITE_OP]; }
unsigned int count_compare_endpoints_xy() const
{ return m_counters[COMPARE_ENDPOINTS_XY_OP]; }
// left-right
unsigned int count_parameter_space_in_x_curve_end() const
{ return m_counters[PARAMETER_SPACE_IN_X_CURVE_END_OP]; }
@ -174,7 +174,7 @@ public:
unsigned int count_parameter_space_in_x_point() const
{ return m_counters[PARAMETER_SPACE_IN_X_POINT_OP]; }
unsigned int count_is_on_x_identification_point() const
{ return m_counters[IS_ON_X_IDENTIFICATION_POINT_OP]; }
@ -242,7 +242,7 @@ public:
Top_side_category;
typedef typename internal::Arr_complete_right_side_category< Base >::Category
Right_side_category;
typedef typename Base::Point_2 Point_2;
typedef typename Base::X_monotone_curve_2 X_monotone_curve_2;
typedef typename Base::Curve_2 Curve_2;
@ -310,7 +310,7 @@ public:
const Point_2 operator()(const X_monotone_curve_2& xc) const
{ ++m_counter; return m_object(xc); }
};
/*! A functor that checks whether a given x-monotone curve is vertical. */
class Is_vertical_2 {
private:
@ -326,7 +326,7 @@ public:
bool operator()(const X_monotone_curve_2& xc) const
{ ++m_counter; return m_object(xc); }
};
/*! A functor that compares the y-coordinates of a point and an
* x-monotone curve at the point x-coordinate.
*/
@ -345,7 +345,7 @@ public:
const X_monotone_curve_2& xc) const
{ ++m_counter; return m_object(p, xc); }
};
/*! A functor that checks whether two points and two x-monotone curves are
* identical.
*/
@ -369,7 +369,7 @@ public:
/*! Operate */
bool operator()(const Point_2& p1, const Point_2& p2) const
{ ++m_counter2; return m_object(p1, p2); }
{ ++m_counter2; return m_object(p1, p2); }
};
/*! A functor that compares compares the y-coordinates of two x-monotone
@ -411,7 +411,7 @@ public:
const Point_2& p) const
{ ++m_counter; return m_object(xc1, xc2, p); }
};
/*! A functor that divides a curve into x-monotone curves. */
class Make_x_monotone_2 {
private:
@ -550,7 +550,7 @@ public:
/*! Construct */
Parameter_space_in_x_2(const Base* base, unsigned int& counter1,
unsigned int& counter2, unsigned int& counter3) :
m_object(base->parameter_space_in_x_2_object()),
m_object(base->parameter_space_in_x_2_object()),
m_counter1(counter1),
m_counter2(counter2),
m_counter3(counter3) {}
@ -583,9 +583,9 @@ public:
public:
/*! Construct */
Is_on_x_identification_2(const Base* base,
Is_on_x_identification_2(const Base* base,
unsigned int& counter1, unsigned int& counter2) :
m_object(base->is_on_x_identificiation_2_object()),
m_object(base->is_on_x_identificiation_2_object()),
m_counter1(counter1),
m_counter2(counter2) {}
@ -619,7 +619,7 @@ public:
Comparison_result operator()(const Point_2& p1, const Point_2& p2) const
{ ++m_counter; return m_object(p1, p2); }
};
/*! A functor that compares the y-coordinates of curve ends near the
* boundary of the parameter space.
*/
@ -635,7 +635,7 @@ public:
/*! Operate */
Comparison_result operator()(const X_monotone_curve_2& xc1,
const X_monotone_curve_2& xc2,
const X_monotone_curve_2& xc2,
Arr_curve_end ce) const
{ ++m_counter; return m_object(xc1, xc2, ce); }
};
@ -656,7 +656,7 @@ public:
/*! Construct */
Parameter_space_in_y_2(const Base* base, unsigned int& counter1,
unsigned int& counter2, unsigned int& counter3) :
m_object(base->parameter_space_in_y_2_object()),
m_object(base->parameter_space_in_y_2_object()),
m_counter1(counter1),
m_counter2(counter2),
m_counter3(counter3) {}
@ -673,7 +673,7 @@ public:
/*! Operate */
Arr_parameter_space operator()(const X_monotone_curve_2& xc) const
{ ++m_counter3; return m_object(xc); }
};
/*! A functor that determines whether a point or a curve lies on an
@ -687,9 +687,9 @@ public:
public:
/*! Construct */
Is_on_y_identification_2(const Base* base,
Is_on_y_identification_2(const Base* base,
unsigned int& counter1, unsigned int& counter2) :
m_object(base->is_on_y_identificiation_2_object()),
m_object(base->is_on_y_identificiation_2_object()),
m_counter1(counter1),
m_counter2(counter2) {}
@ -715,9 +715,9 @@ public:
public:
/*! Construct */
Compare_x_at_limit_2(const Base* base,
Compare_x_at_limit_2(const Base* base,
unsigned int& counter1, unsigned int& counter2) :
m_object(base->compare_x_at_limit_2_object()),
m_object(base->compare_x_at_limit_2_object()),
m_counter1(counter1),
m_counter2(counter2) {}
@ -743,11 +743,11 @@ public:
private:
typename Base::Compare_x_near_limit_2 m_object;
unsigned int& m_counter;
public:
/*! Construct */
Compare_x_near_limit_2(const Base* base, unsigned int& counter) :
m_object(base->compare_x_near_limit_2_object()),
m_object(base->compare_x_near_limit_2_object()),
m_counter(counter) {}
@ -804,12 +804,12 @@ public:
private:
typename Base::Compare_x_near_boundary_2 m_object;
unsigned int& m_counter;
public:
/*! Construct */
Compare_x_near_boundary_2(const Base* base,
Compare_x_near_boundary_2(const Base* base,
unsigned int& counter) :
m_object(base->compare_x_near_boundary_2_object()),
m_object(base->compare_x_near_boundary_2_object()),
m_counter(counter) {}
@ -829,7 +829,7 @@ public:
Compare_x_2 compare_x_2_object() const
{ return Compare_x_2(this, m_counters[COMPARE_X_OP]); }
Compare_xy_2 compare_xy_2_object() const
{ return Compare_xy_2(this, m_counters[COMPARE_XY_OP]); }
@ -838,13 +838,13 @@ public:
Construct_max_vertex_2 construct_max_vertex_2_object() const
{ return Construct_max_vertex_2(this, m_counters[CONSTRUCT_MAX_VERTEX_OP]); }
Is_vertical_2 is_vertical_2_object() const
{ return Is_vertical_2(this, m_counters[IS_VERTICAL_OP]); }
Compare_y_at_x_2 compare_y_at_x_2_object() const
{ return Compare_y_at_x_2(this, m_counters[COMPARE_Y_AT_X_OP]); }
Equal_2 equal_2_object() const
{
return Equal_2(this, m_counters[EQUAL_POINTS_OP],
@ -856,7 +856,7 @@ public:
Compare_y_at_x_right_2 compare_y_at_x_right_2_object() const
{ return Compare_y_at_x_right_2(this, m_counters[COMPARE_Y_AT_X_RIGHT_OP]); }
Make_x_monotone_2 make_x_monotone_2_object() const
{ return Make_x_monotone_2(this, m_counters[MAKE_X_MONOTONE_OP]); }
@ -881,16 +881,16 @@ public:
// left-right
Parameter_space_in_x_2 parameter_space_in_x_2_object() const
{ return Parameter_space_in_x_2(
this,
this,
m_counters[PARAMETER_SPACE_IN_X_CURVE_END_OP],
m_counters[PARAMETER_SPACE_IN_X_POINT_OP],
m_counters[PARAMETER_SPACE_IN_X_CURVE_OP]
);
);
}
Is_on_x_identification_2 is_on_x_identification_2_object() const
{
return Is_on_x_identification_2(this,
return Is_on_x_identification_2(this,
m_counters[IS_ON_X_IDENTIFICATION_POINT_OP],
m_counters[IS_ON_X_IDENTIFICATION_CURVE_OP]);
}
@ -907,25 +907,25 @@ public:
// bottom-top
Parameter_space_in_y_2 parameter_space_in_y_2_object() const
{ return Parameter_space_in_y_2(
this,
this,
m_counters[PARAMETER_SPACE_IN_Y_CURVE_END_OP],
m_counters[PARAMETER_SPACE_IN_Y_POINT_OP],
m_counters[PARAMETER_SPACE_IN_Y_CURVE_OP]
);
);
}
Is_on_y_identification_2 is_on_y_identification_2_object() const
{ return Is_on_y_identification_2(
this,
this,
m_counters[IS_ON_Y_IDENTIFICATION_POINT_OP],
m_counters[IS_ON_Y_IDENTIFICATION_CURVE_OP]
);
);
}
Compare_x_at_limit_2 compare_x_at_limit_2_object() const
{
return
Compare_x_at_limit_2(this,
Compare_x_at_limit_2(this,
m_counters[COMPARE_X_AT_LIMIT_POINT_CURVE_END_OP],
m_counters[COMPARE_X_AT_LIMIT_CURVE_ENDS_OP]);
}
@ -936,12 +936,12 @@ public:
Compare_x_on_boundary_2 compare_x_on_boundary_2_object() const
{
return
Compare_x_on_boundary_2(this,
Compare_x_on_boundary_2(this,
m_counters[COMPARE_X_ON_BOUNDARY_POINTS_OP],
m_counters[COMPARE_X_ON_BOUNDARY_POINT_CURVE_END_OP],
m_counters[COMPARE_X_ON_BOUNDARY_CURVE_ENDS_OP]);
}
Compare_x_near_boundary_2 compare_x_near_boundary_2_object() const
{
return Compare_x_near_boundary_2(this,