Modify to compile with ++-style iterators.
authoralpar
Mon, 25 Oct 2004 13:29:46 +0000
changeset 945f2ea4aac9ada
parent 944 4f064aff855e
child 946 c94ef40a22ce
Modify to compile with ++-style iterators.
src/work/alpar/bfs-named-param.cc
     1.1 --- a/src/work/alpar/bfs-named-param.cc	Sat Oct 16 00:20:13 2004 +0000
     1.2 +++ b/src/work/alpar/bfs-named-param.cc	Mon Oct 25 13:29:46 2004 +0000
     1.3 @@ -54,7 +54,7 @@
     1.4      int Qh=0;
     1.5      int Qt=0;
     1.6      
     1.7 -    for(typename Graph::NodeIt n(_graph);_graph.valid(n);_graph.next(n))
     1.8 +    for(typename Graph::NodeIt n(_graph);n!=INVALID;++n)
     1.9        _visited->set(n,false);
    1.10  
    1.11      Q[Qh++]=_source;
    1.12 @@ -62,7 +62,7 @@
    1.13      do {
    1.14        Node m;
    1.15        Node n=Q[Qt++];
    1.16 -      for(OutEdgeIt e(_graph,n);_graph.valid(e);_graph.next(e))
    1.17 +      for(OutEdgeIt e(_graph,n);e!=INVALID;++e)
    1.18  	if(!(*_visited)[m=_graph.head(e)]) {
    1.19  	  Q[Qh++]=m;
    1.20  	  _visited->set(m,true);