mirror of https://github.com/CGAL/cgal
Fixed warning
This commit is contained in:
parent
e3f0b0137c
commit
9c18aad456
|
|
@ -244,11 +244,12 @@ private:
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Quick fix for now. Can be done faster
|
// Quick fix for now. Can be done faster
|
||||||
bool is_degenerate = false;
|
bool is_degenerate = false;
|
||||||
for(int i = 0; i < points.size()-2;i++){
|
for(Size_type i = 0; i < points.size()- 2; ++i) {
|
||||||
if(CGAL::orientation(points[i],points[i+1],points[i+2]) == CGAL::COLLINEAR){
|
if(traits->orientation_2_object()(points[i], points[i+1], points[i+2])
|
||||||
|
== CGAL::COLLINEAR)
|
||||||
|
{
|
||||||
is_degenerate = true;
|
is_degenerate = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
@ -257,11 +258,11 @@ private:
|
||||||
//std::cout << is_degenerate << std::endl;
|
//std::cout << is_degenerate << std::endl;
|
||||||
std::vector<Segment_2> segments;
|
std::vector<Segment_2> segments;
|
||||||
|
|
||||||
for(typename std::vector<Point_2>::size_type i = 0;i < points.size() - 1; ++i)
|
for(Size_type i = 0; i < points.size() - 1; ++i) {
|
||||||
{
|
|
||||||
segments.push_back(Segment_2(points[i], points[i+1]));
|
segments.push_back(Segment_2(points[i], points[i+1]));
|
||||||
}
|
}
|
||||||
CGAL::insert(out_arr, segments.begin(), segments.end());
|
CGAL::insert(out_arr, segments.begin(), segments.end());
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
points.pop_back();
|
points.pop_back();
|
||||||
//std::cout << " ordanary " << std::endl;
|
//std::cout << " ordanary " << std::endl;
|
||||||
|
|
@ -269,7 +270,7 @@ private:
|
||||||
v_last = v_first =
|
v_last = v_first =
|
||||||
out_arr.insert_in_face_interior(points[0],out_arr.unbounded_face());
|
out_arr.insert_in_face_interior(points[0],out_arr.unbounded_face());
|
||||||
|
|
||||||
for(unsigned int i = 0; i < points.size()-1; i++){
|
for(Size_type i = 0; i < points.size() - 1; ++i) {
|
||||||
if(points[i] < points[(i+1)]) {
|
if(points[i] < points[(i+1)]) {
|
||||||
v_last = out_arr.insert_from_left_vertex (
|
v_last = out_arr.insert_from_left_vertex (
|
||||||
Segment_2(points[i], points[i+1]), v_last
|
Segment_2(points[i], points[i+1]), v_last
|
||||||
|
|
@ -286,9 +287,6 @@ private:
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Visibility_2::report_while_handling_needles<Simple_polygon_visibility_2>(
|
|
||||||
// traits, q, points, out_arr);
|
|
||||||
|
|
||||||
CGAL_postcondition(out_arr.number_of_isolated_vertices() == 0);
|
CGAL_postcondition(out_arr.number_of_isolated_vertices() == 0);
|
||||||
CGAL_postcondition(stack.empty());
|
CGAL_postcondition(stack.empty());
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue