Commit 47dba275 authored by Tiago Peixoto's avatar Tiago Peixoto

Fix (yet again) edge index housekeeping

parent 7f10e926
......@@ -236,19 +236,13 @@ void GraphInterface::RemoveEdgeIndex(const edge_t& e)
size_t index = _edge_index[e];
if (index == _max_edge_index)
{
if (_max_edge_index - 1 == _free_indexes.back())
{
if (_max_edge_index > 0)
_max_edge_index--;
while (_max_edge_index == _free_indexes.back())
{
_free_indexes.pop_back();
if (_max_edge_index > 0)
_max_edge_index--;
}
}
else
if (_max_edge_index > 0)
_max_edge_index--;
while (!_free_indexes.empty() &&
_max_edge_index == _free_indexes.back())
{
_free_indexes.pop_back();
if (_max_edge_index > 0)
_max_edge_index--;
}
......
......@@ -195,7 +195,7 @@ template <class Graph>
inline void remove_edge(typename graph_traits<GraphWrap<Graph> >::edge_descriptor e,
GraphWrap<Graph>& g)
{
g._gi.RemoveEdge(e);
g._gi.RemoveEdgeIndex(e);
}
template <class Graph>
......
Markdown is supported
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