.
1.1 --- a/src/work/list_graph.h Mon Apr 05 17:44:00 2004 +0000
1.2 +++ b/src/work/list_graph.h Mon Apr 05 17:56:31 2004 +0000
1.3 @@ -233,7 +233,9 @@
1.4 ListGraph() : node_id(0), edge_id(0), _node_num(0), _edge_num(0), _first_node(0), _last_node(0) { }
1.5
1.6 ~ListGraph() {
1.7 - while (first<NodeIt>().valid()) erase(first<NodeIt>());
1.8 + NodeIt n;
1.9 + while (this->valid(first(n))) erase(n);
1.10 + //while (first<NodeIt>().valid()) erase(first<NodeIt>());
1.11 }
1.12
1.13 int nodeNum() const { return _node_num; }
1.14 @@ -334,8 +336,16 @@
1.15 }
1.16
1.17 void erase(Node i) {
1.18 - while (first<OutEdgeIt>(i).valid()) erase(first<OutEdgeIt>(i));
1.19 - while (first<InEdgeIt>(i).valid()) erase(first<InEdgeIt>(i));
1.20 + {
1.21 + OutEdgeIt e;
1.22 + while (this->valid(first(e, i))) erase(e);
1.23 + }
1.24 + {
1.25 + InEdgeIt e;
1.26 + while (this->valid(first(e, i))) erase(e);
1.27 + }
1.28 + //while (first<OutEdgeIt>(i).valid()) erase(first<OutEdgeIt>(i));
1.29 + //while (first<InEdgeIt>(i).valid()) erase(first<InEdgeIt>(i));
1.30 _delete_node(i.node);
1.31 }
1.32