# HG changeset patch # User alpar # Date 1113836364 0 # Node ID a490662291b927bd7cdba92611f44d216b92f38b # Parent d00b85f8be45d61e71b37844d85d6cb642358de1 More steps toward gcc-3.4 compatibility diff -r d00b85f8be45 -r a490662291b9 src/lemon/bfs.h --- a/src/lemon/bfs.h Mon Apr 18 14:18:12 2005 +0000 +++ b/src/lemon/bfs.h Mon Apr 18 14:59:24 2005 +0000 @@ -86,7 +86,7 @@ ///This function instantiates a \ref ProcessedMap. ///\param G is the graph, to which ///we would like to define the \ref ProcessedMap - static ProcessedMap *createProcessedMap(const GR &G) + static ProcessedMap *createProcessedMap(const GR &) { return new ProcessedMap(); } @@ -769,7 +769,7 @@ ///This function instantiates a \ref PredMap. ///\param G is the graph, to which we would like to define the PredMap. ///\todo The graph alone may be insufficient to initialize - static PredMap *createPredMap(const GR &G) + static PredMap *createPredMap(const GR &) { return new PredMap(); } @@ -802,7 +802,7 @@ ///This function instantiates a \ref ProcessedMap. ///\param G is the graph, to which ///we would like to define the \ref ProcessedMap - static ProcessedMap *createProcessedMap(const GR &G) + static ProcessedMap *createProcessedMap(const GR &) { return new ProcessedMap(); } @@ -831,7 +831,7 @@ ///This function instantiates a \ref DistMap. ///\param G is the graph, to which we would like to define the \ref DistMap - static DistMap *createDistMap(const GR &G) + static DistMap *createDistMap(const GR &) { return new DistMap(); } @@ -988,7 +988,7 @@ template struct DefPredMapBase : public Base { typedef T PredMap; - static PredMap *createPredMap(const Graph &G) { return 0; }; + static PredMap *createPredMap(const Graph &) { return 0; }; DefPredMapBase(const TR &b) : TR(b) {} }; @@ -1009,7 +1009,7 @@ template struct DefReachedMapBase : public Base { typedef T ReachedMap; - static ReachedMap *createReachedMap(const Graph &G) { return 0; }; + static ReachedMap *createReachedMap(const Graph &) { return 0; }; DefReachedMapBase(const TR &b) : TR(b) {} }; @@ -1030,7 +1030,7 @@ template struct DefProcessedMapBase : public Base { typedef T ProcessedMap; - static ProcessedMap *createProcessedMap(const Graph &G) { return 0; }; + static ProcessedMap *createProcessedMap(const Graph &) { return 0; }; DefProcessedMapBase(const TR &b) : TR(b) {} }; @@ -1071,7 +1071,7 @@ template struct DefDistMapBase : public Base { typedef T DistMap; - static DistMap *createDistMap(const Graph &G) { return 0; }; + static DistMap *createDistMap(const Graph &) { return 0; }; DefDistMapBase(const TR &b) : TR(b) {} }; diff -r d00b85f8be45 -r a490662291b9 src/lemon/concept/graph.h --- a/src/lemon/concept/graph.h Mon Apr 18 14:18:12 2005 +0000 +++ b/src/lemon/concept/graph.h Mon Apr 18 14:59:24 2005 +0000 @@ -185,7 +185,7 @@ /// Copy constructor. /// - NodeIt(const NodeIt&) { } + NodeIt(const NodeIt& n) : Node(n) { } /// Invalid constructor \& conversion. /// Initialize the iterator to be invalid. @@ -195,7 +195,7 @@ /// Sets the iterator to the first node of \c g. /// - NodeIt(const StaticGraph& g) { } + NodeIt(const StaticGraph&) { } /// Node -> NodeIt conversion. /// Sets the iterator to the node of \c g pointed by the trivial @@ -267,7 +267,7 @@ /// Copy constructor. /// - OutEdgeIt(const OutEdgeIt&) { } + OutEdgeIt(const OutEdgeIt& e) : Edge(e) { } /// Initialize the iterator to be invalid. /// Initialize the iterator to be invalid. @@ -279,7 +279,7 @@ /// node ///@param n the node ///@param g the graph - OutEdgeIt(const StaticGraph& g, const Node& n) { } + OutEdgeIt(const StaticGraph&, const Node&) { } /// Edge -> OutEdgeIt conversion /// Sets the iterator to the value of the trivial iterator \c e. @@ -316,7 +316,7 @@ /// Copy constructor. /// - InEdgeIt(const InEdgeIt&) { } + InEdgeIt(const InEdgeIt& e) : Edge(e) { } /// Initialize the iterator to be invalid. /// Initialize the iterator to be invalid. @@ -328,13 +328,13 @@ /// node ///@param n the node ///@param g the graph - InEdgeIt(const StaticGraph& g, const Node& n) { } + InEdgeIt(const StaticGraph&, const Node&) { } /// Edge -> InEdgeIt conversion /// Sets the iterator to the value of the trivial iterator \c e. /// This feature necessitates that each time we /// iterate the edge-set, the iteration order is the same. - InEdgeIt(const StaticGraph& g, const Edge& n) { } + InEdgeIt(const StaticGraph&, const Edge&) { } /// Next incoming edge /// Assign the iterator to the next inedge of the corresponding node. @@ -361,7 +361,7 @@ /// Copy constructor. /// - EdgeIt(const EdgeIt&) { } + EdgeIt(const EdgeIt& e) : Edge(e) { } /// Initialize the iterator to be invalid. /// Initialize the iterator to be invalid. @@ -372,7 +372,7 @@ /// This constructor set the iterator to the first edge of /// node ///@param g the graph - EdgeIt(const StaticGraph& g) { } + EdgeIt(const StaticGraph&) { } /// Edge -> EdgeIt conversion /// Sets the iterator to the value of the trivial iterator \c e. @@ -413,7 +413,7 @@ NodeMap(const StaticGraph&, T) { } ///Copy constructor - NodeMap(const NodeMap&) { } + NodeMap(const NodeMap& nm) : ReadWriteMap< Node, T >(nm) { } ///Assignment operator NodeMap& operator=(const NodeMap&) { return *this; } // \todo fix this concept @@ -436,7 +436,7 @@ ///\e EdgeMap(const StaticGraph&, T) { } ///Copy constructor - EdgeMap(const EdgeMap&) { } + EdgeMap(const EdgeMap& em) : ReadWriteMap(em) { } ///Assignment operator EdgeMap& operator=(const EdgeMap&) { return *this; } // \todo fix this concept @@ -470,7 +470,7 @@ ///Add a new edge to the graph with source node \c s ///and target node \c t. ///\return the new edge. - Edge addEdge(Node s, Node t) { return INVALID; } + Edge addEdge(Node, Node) { return INVALID; } /// Resets the graph. @@ -500,12 +500,12 @@ /// Deletes node \c n node. /// - void erase(Node n) { } + void erase(Node) { } /// Deletes an edge. /// Deletes edge \c e edge. /// - void erase(Edge e) { } + void erase(Edge) { } template struct Constraints : public _ErasableGraph::Constraints<_Graph> {}; diff -r d00b85f8be45 -r a490662291b9 src/lemon/concept/graph_component.h --- a/src/lemon/concept/graph_component.h Mon Apr 18 14:18:12 2005 +0000 +++ b/src/lemon/concept/graph_component.h Mon Apr 18 14:59:24 2005 +0000 @@ -304,7 +304,7 @@ /// Gives back the node by the unique id. /// If the graph does not contain node with the given id /// then the result of the function is undetermined. - Node fromId(int id, Node) const { return INVALID;} + Node fromId(int , Node) const { return INVALID;} /// \brief Gives back an unique integer id for the Edge. /// @@ -317,7 +317,7 @@ /// Gives back the edge by the unique id. /// If the graph does not contain edge with the given id /// then the result of the function is undetermined. - Edge fromId(int id, Edge) const { return INVALID;} + Edge fromId(int, Edge) const { return INVALID;} template struct Constraints { @@ -398,7 +398,7 @@ /// Adds a new Edge connects the two Nodes to the graph. /// - Edge addEdge(const Node& from, const Node& to) { + Edge addEdge(const Node&, const Node&) { return INVALID; } @@ -745,7 +745,7 @@ /// \brief Copy constructor. /// /// Copy Constructor. - GraphMap(const GraphMap&) {} + GraphMap(const GraphMap& gm) :ReadWriteMap(gm) {} /// \brief Assign operator. /// @@ -809,7 +809,7 @@ /// \brief Copy constructor. /// /// Copy Constructor. - NodeMap(const NodeMap&) {} + NodeMap(const NodeMap& nm) : GraphMap(nm) {} /// \brief Assign operator. /// @@ -839,7 +839,7 @@ /// \brief Copy constructor. /// /// Copy Constructor. - EdgeMap(const EdgeMap&) {} + EdgeMap(const EdgeMap& em) :GraphMap(em) {} /// \brief Assign operator. /// @@ -917,7 +917,7 @@ /// \brief Add an edge to the graph. /// /// Add an edge to the graph and notify the observers. - Edge addEdge(const Node& from, const Node& to) { + Edge addEdge(const Node&, const Node&) { return INVALID; } diff -r d00b85f8be45 -r a490662291b9 src/lemon/concept/maps.h --- a/src/lemon/concept/maps.h Mon Apr 18 14:18:12 2005 +0000 +++ b/src/lemon/concept/maps.h Mon Apr 18 14:59:24 2005 +0000 @@ -76,7 +76,7 @@ typedef T Value; /// Sets the value associated with a key. - void set(const Key &k,const Value &t) {} + void set(const Key &,const Value &) {} ///Default constructor WriteMap() {} @@ -114,9 +114,9 @@ typedef T Value; /// Returns the value associated with a key. - Value operator[](const Key &k) const {return Value();} + Value operator[](const Key &) const {return Value();} /// Sets the value associated with a key. - void set(const Key &k,const Value &t) {} + void set(const Key & ,const Value &) {} template struct Constraints { diff -r d00b85f8be45 -r a490662291b9 src/lemon/concept/path.h --- a/src/lemon/concept/path.h Mon Apr 18 14:18:12 2005 +0000 +++ b/src/lemon/concept/path.h Mon Apr 18 14:59:24 2005 +0000 @@ -54,7 +54,7 @@ /// \param _G The graph in which the path is. /// - Path(const Graph &_G) {} + Path(const Graph &) {} /// Length of the path. int length() const {return 0;} @@ -86,13 +86,13 @@ /// /// Returns node iterator pointing to the target node of the /// given edge iterator. - NodeIt target(const EdgeIt& e) const {return INVALID;} + NodeIt target(const EdgeIt&) const {return INVALID;} /// \brief The source of an edge. /// /// Returns node iterator pointing to the source node of the /// given edge iterator. - NodeIt source(const EdgeIt& e) const {return INVALID;} + NodeIt source(const EdgeIt&) const {return INVALID;} /* Iterator classes */ @@ -112,7 +112,7 @@ /// Invalid constructor EdgeIt(Invalid) {} /// Constructor with starting point - EdgeIt(const Path &_p) {} + EdgeIt(const Path &) {} operator GraphEdge () const {} @@ -120,9 +120,9 @@ EdgeIt& operator++() {return *this;} /// Comparison operator - bool operator==(const EdgeIt& e) const {return true;} + bool operator==(const EdgeIt&) const {return true;} /// Comparison operator - bool operator!=(const EdgeIt& e) const {return true;} + bool operator!=(const EdgeIt&) const {return true;} // /// Comparison operator // /// \todo It is not clear what is the "natural" ordering. // bool operator<(const EdgeIt& e) const {} @@ -144,7 +144,7 @@ /// Invalid constructor NodeIt(Invalid) {} /// Constructor with starting point - NodeIt(const Path &_p) {} + NodeIt(const Path &) {} ///Conversion to Graph::Node operator const GraphNode& () const {} @@ -152,9 +152,9 @@ NodeIt& operator++() {return *this;} /// Comparison operator - bool operator==(const NodeIt& e) const {return true;} + bool operator==(const NodeIt&) const {return true;} /// Comparison operator - bool operator!=(const NodeIt& e) const {return true;} + bool operator!=(const NodeIt&) const {return true;} // /// Comparison operator // /// \todo It is not clear what is the "natural" ordering. // bool operator<(const NodeIt& e) const {} @@ -201,14 +201,14 @@ ///Push a new edge to the front of the path. ///If the path is empty, you \em must call \ref setStartNode() before ///the first use of \ref pushFront(). - void pushFront(const GraphEdge& e) {} + void pushFront(const GraphEdge&) {} ///Push a new edge to the back of the path ///Push a new edge to the back of the path. ///If the path is empty, you \em must call \ref setStartNode() before ///the first use of \ref pushBack(). - void pushBack(const GraphEdge& e) {} + void pushBack(const GraphEdge&) {} ///Commit the changes to the path. void commit() {} @@ -218,13 +218,13 @@ ///If you know a reasonable upper bound on the number of the edges ///to add to the front of the path, ///using this function you may speed up the building. - void reserveFront(size_t r) {} + void reserveFront(size_t) {} ///Reserve (back) storage for the builder in advance. ///If you know a reasonable upper bound on the number of the edges ///to add to the back of the path, ///using this function you may speed up the building. - void reserveBack(size_t r) {} + void reserveBack(size_t) {} }; }; diff -r d00b85f8be45 -r a490662291b9 src/lemon/concept/undir_graph.h --- a/src/lemon/concept/undir_graph.h Mon Apr 18 14:18:12 2005 +0000 +++ b/src/lemon/concept/undir_graph.h Mon Apr 18 14:59:24 2005 +0000 @@ -46,7 +46,7 @@ UndirGraphEdge() {} /// \e - UndirGraphEdge(const UndirGraphEdge&) {} + UndirGraphEdge(const UndirGraphEdge& e) : UndirGraph::UndirEdge(e) {} /// \e UndirGraphEdge(Invalid) {} @@ -469,13 +469,13 @@ /// Base node of the iterator /// /// Returns the base node of the iterator - Node baseNode(IncEdgeIt e) const { + Node baseNode(IncEdgeIt) const { return INVALID; } /// Running node of the iterator /// /// Returns the running node of the iterator - Node runningNode(IncEdgeIt e) const { + Node runningNode(IncEdgeIt) const { return INVALID; } diff -r d00b85f8be45 -r a490662291b9 src/lemon/dfs.h --- a/src/lemon/dfs.h Mon Apr 18 14:18:12 2005 +0000 +++ b/src/lemon/dfs.h Mon Apr 18 14:59:24 2005 +0000 @@ -86,7 +86,7 @@ ///This function instantiates a \ref ProcessedMap. ///\param G is the graph, to which ///we would like to define the \ref ProcessedMap - static ProcessedMap *createProcessedMap(const GR &G) + static ProcessedMap *createProcessedMap(const GR &) { return new ProcessedMap(); } @@ -776,7 +776,7 @@ ///This function instantiates a \ref PredMap. ///\param G is the graph, to which we would like to define the PredMap. ///\todo The graph alone may be insufficient to initialize - static PredMap *createPredMap(const GR &G) + static PredMap *createPredMap(const GR &) { return new PredMap(); } @@ -809,7 +809,7 @@ ///This function instantiates a \ref ProcessedMap. ///\param G is the graph, to which ///we would like to define the \ref ProcessedMap - static ProcessedMap *createProcessedMap(const GR &G) + static ProcessedMap *createProcessedMap(const GR &) { return new ProcessedMap(); } @@ -838,7 +838,7 @@ ///This function instantiates a \ref DistMap. ///\param G is the graph, to which we would like to define the \ref DistMap - static DistMap *createDistMap(const GR &G) + static DistMap *createDistMap(const GR &) { return new DistMap(); } @@ -994,7 +994,7 @@ template struct DefPredMapBase : public Base { typedef T PredMap; - static PredMap *createPredMap(const Graph &G) { return 0; }; + static PredMap *createPredMap(const Graph &) { return 0; }; DefPredMapBase(const TR &b) : TR(b) {} }; @@ -1015,7 +1015,7 @@ template struct DefReachedMapBase : public Base { typedef T ReachedMap; - static ReachedMap *createReachedMap(const Graph &G) { return 0; }; + static ReachedMap *createReachedMap(const Graph &) { return 0; }; DefReachedMapBase(const TR &b) : TR(b) {} }; @@ -1036,7 +1036,7 @@ template struct DefProcessedMapBase : public Base { typedef T ProcessedMap; - static ProcessedMap *createProcessedMap(const Graph &G) { return 0; }; + static ProcessedMap *createProcessedMap(const Graph &) { return 0; }; DefProcessedMapBase(const TR &b) : TR(b) {} }; @@ -1077,7 +1077,7 @@ template struct DefDistMapBase : public Base { typedef T DistMap; - static DistMap *createDistMap(const Graph &G) { return 0; }; + static DistMap *createDistMap(const Graph &) { return 0; }; DefDistMapBase(const TR &b) : TR(b) {} }; diff -r d00b85f8be45 -r a490662291b9 src/lemon/dijkstra.h --- a/src/lemon/dijkstra.h Mon Apr 18 14:18:12 2005 +0000 +++ b/src/lemon/dijkstra.h Mon Apr 18 14:59:24 2005 +0000 @@ -787,7 +787,7 @@ ///This function instantiates a \ref PredMap. ///\param G is the graph, to which we would like to define the PredMap. ///\todo The graph alone may be insufficient for the initialization - static PredMap *createPredMap(const GR &G) + static PredMap *createPredMap(const GR &) { return new PredMap(); } @@ -805,7 +805,7 @@ ///This function instantiates a \ref ProcessedMap. ///\param G is the graph, to which ///we would like to define the \ref ProcessedMap - static ProcessedMap *createProcessedMap(const GR &G) + static ProcessedMap *createProcessedMap(const GR &) { return new ProcessedMap(); } @@ -819,7 +819,7 @@ ///This function instantiates a \ref DistMap. ///\param G is the graph, to which we would like to define the \ref DistMap - static DistMap *createDistMap(const GR &G) + static DistMap *createDistMap(const GR &) { return new DistMap(); } @@ -974,7 +974,7 @@ template struct DefPredMapBase : public Base { typedef T PredMap; - static PredMap *createPredMap(const Graph &G) { return 0; }; + static PredMap *createPredMap(const Graph &) { return 0; }; DefPredMapBase(const TR &b) : TR(b) {} }; @@ -1015,7 +1015,7 @@ template struct DefDistMapBase : public Base { typedef T DistMap; - static DistMap *createDistMap(const Graph &G) { return 0; }; + static DistMap *createDistMap(const Graph &) { return 0; }; DefDistMapBase(const TR &b) : TR(b) {} }; diff -r d00b85f8be45 -r a490662291b9 src/lemon/graph_to_eps.h --- a/src/lemon/graph_to_eps.h Mon Apr 18 14:18:12 2005 +0000 +++ b/src/lemon/graph_to_eps.h Mon Apr 18 14:59:24 2005 +0000 @@ -363,10 +363,10 @@ edgeLess(const Graph &_g) : g(_g) {} bool operator()(Edge a,Edge b) const { - Node ai=min(g.source(a),g.target(a)); - Node aa=max(g.source(a),g.target(a)); - Node bi=min(g.source(b),g.target(b)); - Node ba=max(g.source(b),g.target(b)); + Node ai=std::min(g.source(a),g.target(a)); + Node aa=std::max(g.source(a),g.target(a)); + Node bi=std::min(g.source(b),g.target(b)); + Node ba=std::max(g.source(b),g.target(b)); return ai