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

graph_adjacency.hh: change check to assertion in remove_edge()

parent 7a3620b2
......@@ -845,20 +845,19 @@ inline void remove_edge(const typename adj_list<Vertex>::edge_descriptor& e,
}
else // O(1)
{
if (idx < g._epos.size())
{
const auto& pos = g._epos[idx];
assert(idx < g._epos.size());
g._epos[oes.back().second].first = pos.first;
oes[pos.first] = oes.back();
oes.pop_back();
const auto& pos = g._epos[idx];
g._epos[ies.back().second].second = pos.second;
ies[pos.second] = ies.back();
ies.pop_back();
g._epos[oes.back().second].first = pos.first;
oes[pos.first] = oes.back();
oes.pop_back();
found = true;
}
g._epos[ies.back().second].second = pos.second;
ies[pos.second] = ies.back();
ies.pop_back();
found = true;
}
if (found)
......
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