mirror of https://github.com/CGAL/cgal
Merge branch 'Polygon_2-patch_from_a_user-lrineau'
All Polygon_2::erase() overloads now return an iterator or a circulator, to make them more convenient (and STL-like). That patch is a non-significant contribution (as regard the owernship of code) from a CGAL-discuss user. Tested in CGAL-4.4.-Ic-91.
This commit is contained in:
commit
b8f76c4f63
|
|
@ -212,16 +212,21 @@ class Polygon_2 {
|
|||
{ d_container.insert(d_container.end(), x); }
|
||||
|
||||
/// Erases the vertex pointed to by `i`.
|
||||
void erase(Vertex_iterator i)
|
||||
{ d_container.erase(i); }
|
||||
Vertex_iterator erase(Vertex_iterator i)
|
||||
{
|
||||
return d_container.erase(i);
|
||||
}
|
||||
|
||||
void erase(Vertex_circulator i)
|
||||
{ d_container.erase(i.mod_iterator()); }
|
||||
Vertex_circulator erase(Vertex_circulator i)
|
||||
{
|
||||
return Vertex_circulator(&d_container,
|
||||
d_container.erase(i.mod_iterator()));
|
||||
}
|
||||
|
||||
/// Erases the vertices in the range `[first, last)`.
|
||||
void erase(Vertex_iterator first, Vertex_iterator last)
|
||||
Vertex_iterator erase(Vertex_iterator first, Vertex_iterator last)
|
||||
{
|
||||
d_container.erase(first, last);
|
||||
return d_container.erase(first, last);
|
||||
}
|
||||
|
||||
/// Erases the vertices in the range `[first, last)`.
|
||||
|
|
|
|||
Loading…
Reference in New Issue