mirror of https://github.com/CGAL/cgal
bug fix in deprecated version of incident_vertices()
This commit is contained in:
parent
75c077612a
commit
0ff70f4847
|
|
@ -1,3 +1,6 @@
|
|||
Version 1.113 (7 May 02)
|
||||
- bug fix in deprecated version of incident_vertices()
|
||||
|
||||
Version 1.112 (12 April 02)
|
||||
- Split insert_conflict() in insert_conflict_2() and insert_conflict_3().
|
||||
|
||||
|
|
|
|||
|
|
@ -2217,31 +2217,7 @@ incident_vertices(Vertex_handle v, std::set<Vertex_handle> & vertices,
|
|||
CGAL_triangulation_precondition( v != NULL );
|
||||
CGAL_triangulation_expensive_precondition( is_vertex(v) );
|
||||
|
||||
if ( number_of_vertices() < 2 )
|
||||
return;
|
||||
|
||||
if ( c == NULL )
|
||||
c = v->cell();
|
||||
else
|
||||
CGAL_triangulation_precondition( c->has_vertex(v) );
|
||||
|
||||
int d = dimension();
|
||||
int j;
|
||||
int found = 0;
|
||||
for ( j=0; j <= d; j++ ) {
|
||||
if ( j != c->index(v) ) {
|
||||
if ( vertices.find( c->vertex(j) ) == vertices.end() )
|
||||
vertices.insert( c->vertex(j) );
|
||||
else
|
||||
found++; // c->vertex(j) was already found
|
||||
}
|
||||
}
|
||||
if ( found == 3 )
|
||||
return; // c was already visited
|
||||
|
||||
for ( j=0; j <= d; j++ )
|
||||
if ( j != c->index(v) )
|
||||
incident_vertices( v, vertices, c->neighbor(j) );
|
||||
incident_vertices(v, std::inserter(vertices, vertices.begin()));
|
||||
}
|
||||
|
||||
template <class Vb, class Cb >
|
||||
|
|
|
|||
Loading…
Reference in New Issue