Resolve GCC-4.4 warnings & fix ambiguous op=() in graph_components.h
authorAlpar Juttner <alpar@cs.elte.hu>
Tue, 12 May 2009 15:02:18 +0100
changeset 7131993af615e68
parent 712 e652b6f9a29f
child 714 d10545c08e61
Resolve GCC-4.4 warnings & fix ambiguous op=() in graph_components.h
lemon/concepts/graph_components.h
     1.1 --- a/lemon/concepts/graph_components.h	Tue May 12 11:49:13 2009 +0100
     1.2 +++ b/lemon/concepts/graph_components.h	Tue May 12 15:02:18 2009 +0100
     1.3 @@ -71,6 +71,11 @@
     1.4        /// Assignment operator for the item.
     1.5        GraphItem& operator=(const GraphItem&) { return *this; }
     1.6  
     1.7 +      /// \brief Assignment operator for INVALID.
     1.8 +      ///
     1.9 +      /// This operator makes the item invalid.
    1.10 +      GraphItem& operator=(Invalid) { return *this; }
    1.11 +
    1.12        /// \brief Equality operator.
    1.13        ///
    1.14        /// Equality operator.
    1.15 @@ -96,6 +101,7 @@
    1.16        struct Constraints {
    1.17          void constraints() {
    1.18            _GraphItem i1;
    1.19 +          i1=INVALID;
    1.20            _GraphItem i2 = i1;
    1.21            _GraphItem i3 = INVALID;
    1.22  
    1.23 @@ -221,14 +227,7 @@
    1.24          /// Besides the core graph item functionality each arc should
    1.25          /// be convertible to the represented edge.
    1.26          Edge(const Arc&) {}
    1.27 -
    1.28 -        /// \brief Assign an arc to an edge.
    1.29 -        ///
    1.30 -        /// This function assigns an arc to an edge.
    1.31 -        /// Besides the core graph item functionality each arc should
    1.32 -        /// be convertible to the represented edge.
    1.33 -        Edge& operator=(const Arc&) { return *this; }
    1.34 -      };
    1.35 +     };
    1.36  
    1.37        /// \brief Return one end node of an edge.
    1.38        ///
    1.39 @@ -353,10 +352,12 @@
    1.40          void constraints() {
    1.41            checkConcept<Base, _Digraph >();
    1.42            typename _Digraph::Node node;
    1.43 +          node=INVALID;
    1.44            int nid = digraph.id(node);
    1.45            nid = digraph.id(node);
    1.46            node = digraph.nodeFromId(nid);
    1.47            typename _Digraph::Arc arc;
    1.48 +          arc=INVALID;
    1.49            int eid = digraph.id(arc);
    1.50            eid = digraph.id(arc);
    1.51            arc = digraph.arcFromId(eid);