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,10 +341,14 @@ 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)
{ {
// protects against inserting twice the same constraint if( va != vb ){
bool no_twice = hierarchy.insert_constraint(va, vb); // protects against inserting twice the same constraint
if (va != vb && no_twice ) insert_subconstraint(va,vb); bool no_twice = hierarchy.insert_constraint(va, vb);
return; if ( no_twice ){
insert_subconstraint(va,vb);
}
}
return;
} }