Fix a bug in the copy-constructor of TDS

When the dimension is -1, there is one vertex: the infinite vertex.
This commit is contained in:
Clement Jamin 2014-09-02 18:47:00 +02:00
parent 681f6dd11c
commit 72601f6cbd
1 changed files with 1 additions and 1 deletions

View File

@ -195,7 +195,7 @@ public:
cto = full_cells_begin();
while( cto != full_cells_end() )
{
for( int i = 0; i <= current_dimension(); ++i )
for( int i = 0; i <= (std::max)(0, current_dimension()); ++i )
{
associate_vertex_with_full_cell(cto, i, vmap[cto->vertex(i)]);
cto->set_neighbor(i, cmap[cto->neighbor(i)]);