Bug fix in ConEdgeIt (#195)
authorPeter Kovacs <kpeter@inf.elte.hu>
Fri, 12 Dec 2008 21:37:22 +0100
changeset 429b0f74ca2e3ac
parent 397 62f9787c516c
child 433 39b03fc708fd
child 436 561be42c4b99
Bug fix in ConEdgeIt (#195)
lemon/core.h
     1.1 --- a/lemon/core.h	Mon Dec 01 14:33:42 2008 +0100
     1.2 +++ b/lemon/core.h	Fri Dec 12 21:37:22 2008 +0100
     1.3 @@ -1170,8 +1170,8 @@
     1.4      ///
     1.5      /// Construct a new ConEdgeIt iterating on the edges that
     1.6      /// connects nodes \c u and \c v.
     1.7 -    ConEdgeIt(const Graph& g, Node u, Node v) : _graph(g) {
     1.8 -      Parent::operator=(findEdge(_graph, u, v));
     1.9 +    ConEdgeIt(const Graph& g, Node u, Node v) : _graph(g), _u(u), _v(v) {
    1.10 +      Parent::operator=(findEdge(_graph, _u, _v));
    1.11      }
    1.12  
    1.13      /// \brief Constructor.
    1.14 @@ -1183,12 +1183,12 @@
    1.15      ///
    1.16      /// It increments the iterator and gives back the next edge.
    1.17      ConEdgeIt& operator++() {
    1.18 -      Parent::operator=(findEdge(_graph, _graph.u(*this),
    1.19 -                                 _graph.v(*this), *this));
    1.20 +      Parent::operator=(findEdge(_graph, _u, _v, *this));
    1.21        return *this;
    1.22      }
    1.23    private:
    1.24      const Graph& _graph;
    1.25 +    Node _u, _v;
    1.26    };
    1.27  
    1.28