mirror of https://github.com/CGAL/cgal
Fixes so that the testsuite compiles again
This commit is contained in:
parent
2458965c15
commit
e632bebdba
|
|
@ -73,7 +73,7 @@ class Indirect_edge_compare
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// construct supporting line for edge
|
// construct supporting line for edge
|
||||||
Line_2 line = _construct_line_2(*edge_vtx_1, *edge_vtx_2);
|
Line_2 line = _construct_line_2(Point_2(*edge_vtx_1), Point_2(*edge_vtx_2));
|
||||||
return _compare_x_at_y_2(Point_2(*vertex), line) == SMALLER;
|
return _compare_x_at_y_2(Point_2(*vertex), line) == SMALLER;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -102,10 +102,10 @@ class Indirect_edge_compare
|
||||||
|
|
||||||
// else neither endpoint is shared
|
// else neither endpoint is shared
|
||||||
// construct supporting line
|
// construct supporting line
|
||||||
Line_2 l_p = _construct_line_2(*p, *after_p);
|
Line_2 l_p = _construct_line_2(Point_2(*p), Point_2(*after_p));
|
||||||
if (_is_horizontal_2(l_p))
|
if (_is_horizontal_2(l_p))
|
||||||
{
|
{
|
||||||
Line_2 l_q = _construct_line_2(*q, *after_q);
|
Line_2 l_q = _construct_line_2(Point_2(*q), Point_2(*after_q));
|
||||||
|
|
||||||
if (_is_horizontal_2(l_q))
|
if (_is_horizontal_2(l_q))
|
||||||
{
|
{
|
||||||
|
|
@ -134,7 +134,7 @@ class Indirect_edge_compare
|
||||||
return q_larger_x;
|
return q_larger_x;
|
||||||
// else one smaller and one larger
|
// else one smaller and one larger
|
||||||
// construct the other line
|
// construct the other line
|
||||||
Line_2 l_q = _construct_line_2(*q, *after_q);
|
Line_2 l_q = _construct_line_2(Point_2(*q), Point_2(*after_q));
|
||||||
if (_is_horizontal_2(l_q)) // p is not horizontal
|
if (_is_horizontal_2(l_q)) // p is not horizontal
|
||||||
{
|
{
|
||||||
return _compare_x_at_y_2(Point_2(*q), l_p) == LARGER;
|
return _compare_x_at_y_2(Point_2(*q), l_p) == LARGER;
|
||||||
|
|
|
||||||
|
|
@ -70,6 +70,13 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct Equal {
|
||||||
|
bool operator()(const Point_2& p, const Point_2& q) const
|
||||||
|
{
|
||||||
|
return p == q;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
// constructor
|
// constructor
|
||||||
template<class ForwardIterator>
|
template<class ForwardIterator>
|
||||||
Rotation_tree_2(ForwardIterator first, ForwardIterator beyond, const Traits& traits)
|
Rotation_tree_2(ForwardIterator first, ForwardIterator beyond, const Traits& traits)
|
||||||
|
|
@ -78,8 +85,9 @@ public:
|
||||||
push_back(*it);
|
push_back(*it);
|
||||||
|
|
||||||
Greater greater (traits.less_xy_2_object());
|
Greater greater (traits.less_xy_2_object());
|
||||||
|
Equal equal;
|
||||||
std::sort(this->begin(), this->end(), greater);
|
std::sort(this->begin(), this->end(), greater);
|
||||||
std::unique(this->begin(), this->end());
|
std::unique(this->begin(), this->end(),equal);
|
||||||
|
|
||||||
// front() is the point with the largest x coordinate
|
// front() is the point with the largest x coordinate
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue