Commit 819cb692 authored by Tiago Peixoto's avatar Tiago Peixoto
Browse files

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

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