diff --git a/Point_set_3/include/CGAL/Point_set_3.h b/Point_set_3/include/CGAL/Point_set_3.h index fa44d2404ee..84aa7ed209a 100644 --- a/Point_set_3/include/CGAL/Point_set_3.h +++ b/Point_set_3/include/CGAL/Point_set_3.h @@ -590,7 +590,10 @@ public: */ void remove (const Index& index) { - remove (m_indices.begin() + index); + iterator it = m_indices.begin() + index; + while (*it != index) + it = m_indices.begin() + *it; + remove (it); } @@ -610,6 +613,14 @@ public: return (std::distance (it, garbage_begin()) <= 0); } + bool is_removed (const Index& index) const + { + const_iterator it = m_indices.begin() + index; + while (*it != index) + it = m_indices.begin() + *it; + return is_removed (it); + } + /*! \brief Returns the constant iterator to the first element marked as removed (equal to `garbage_end()` if no elements are marked as removed.