This commit is contained in:
Andreas Fabri 2007-03-07 10:13:23 +00:00
parent 86cc842d4d
commit 6f0cda39a7
1 changed files with 8 additions and 4 deletions

View File

@ -341,9 +341,13 @@ inline void
Constrained_triangulation_plus_2<Tr>:: Constrained_triangulation_plus_2<Tr>::
insert_constraint(Vertex_handle va, Vertex_handle vb) insert_constraint(Vertex_handle va, Vertex_handle vb)
{ {
if( va != vb ){
// protects against inserting twice the same constraint // protects against inserting twice the same constraint
bool no_twice = hierarchy.insert_constraint(va, vb); bool no_twice = hierarchy.insert_constraint(va, vb);
if (va != vb && no_twice ) insert_subconstraint(va,vb); if ( no_twice ){
insert_subconstraint(va,vb);
}
}
return; return;
} }