T_3:::copy_triangulation_into_hole postpone *cit++

If the output iterator is a function-output-iterator, then the cell is already
correctly constructed.

Also, rename `fit` to `cit`
This commit is contained in:
Laurent Rineau 2024-02-22 16:13:31 +01:00
parent 2e7060d87f
commit eb9672d5be
1 changed files with 4 additions and 3 deletions

View File

@ -5097,7 +5097,7 @@ Triangulation_3<Gt,Tds,Lds>::
copy_triangulation_into_hole(const Vertex_handle_unique_hash_map& vmap, copy_triangulation_into_hole(const Vertex_handle_unique_hash_map& vmap,
Vertex_triple_Facet_map&& outer_map, Vertex_triple_Facet_map&& outer_map,
const Vertex_triple_Facet_map& inner_map, const Vertex_triple_Facet_map& inner_map,
OutputItCells fit) OutputItCells cit)
{ {
while(! outer_map.empty()) while(! outer_map.empty())
{ {
@ -5125,7 +5125,6 @@ copy_triangulation_into_hole(const Vertex_handle_unique_hash_map& vmap,
// Create a new cell and glue it to the outer surface // Create a new cell and glue it to the outer surface
Cell_handle new_ch = tds().create_cell(); Cell_handle new_ch = tds().create_cell();
*fit++ = new_ch;
new_ch->set_vertices(vmap[i_ch->vertex(0)], vmap[i_ch->vertex(1)], new_ch->set_vertices(vmap[i_ch->vertex(0)], vmap[i_ch->vertex(1)],
vmap[i_ch->vertex(2)], vmap[i_ch->vertex(3)]); vmap[i_ch->vertex(2)], vmap[i_ch->vertex(3)]);
@ -5135,6 +5134,8 @@ copy_triangulation_into_hole(const Vertex_handle_unique_hash_map& vmap,
for(int j=0; j<4; j++) for(int j=0; j<4; j++)
new_ch->vertex(j)->set_cell(new_ch); new_ch->vertex(j)->set_cell(new_ch);
*cit++ = new_ch;
// For the other faces check, if they can also be glued // For the other faces check, if they can also be glued
for(unsigned int index = 0; index < 4; index++) for(unsigned int index = 0; index < 4; index++)
{ {
@ -5164,7 +5165,7 @@ copy_triangulation_into_hole(const Vertex_handle_unique_hash_map& vmap,
} }
} }
} }
return fit; return cit;
} }