Commit cc140652 authored by Tiago Peixoto's avatar Tiago Peixoto
Browse files

Slight improvement of vertex property re-indexing

This avoids copying property values when not necessary, if the index
remains the same after purging
parent 9e612575
......@@ -86,7 +86,8 @@ struct reindex_vertex_property
for (size_t i = 0; i < num_vertices(g); ++i)
GraphInterface::vertex_t v = vertex(i, g);
pmap[v] = pmap[vertex(old_index[v], g)];
if (old_index[v] != int(i))
pmap[v] = pmap[vertex(old_index[v], g)];
found = true;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment