# HG changeset patch
# User deba
# Date 1221837281 0
# Node ID 6aa6fcaeaea51036b337104e3c3aa85b2c7b4573
# Parent  5222a3c470edb4aee41a8c939df2c78b407d5290
G++-4.3 compatibility changes

diff -r 5222a3c470ed -r 6aa6fcaeaea5 lemon/bits/bezier.h
--- a/lemon/bits/bezier.h	Tue Jul 22 11:29:57 2008 +0000
+++ b/lemon/bits/bezier.h	Fri Sep 19 15:14:41 2008 +0000
@@ -34,7 +34,7 @@
 
 class BezierBase {
 public:
-  typedef Point<double> Point;
+  typedef lemon::dim2::Point<double> Point;
 protected:
   static Point conv(Point x,Point y,double t) {return (1-t)*x+t*y;}
 };
diff -r 5222a3c470ed -r 6aa6fcaeaea5 lemon/bits/traits.h
--- a/lemon/bits/traits.h	Tue Jul 22 11:29:57 2008 +0000
+++ b/lemon/bits/traits.h	Fri Sep 19 15:14:41 2008 +0000
@@ -224,8 +224,8 @@
     typedef typename Map::Key Key;
     typedef typename Map::Value Value;
 
-    typedef const Value ConstReturnValue;
-    typedef const Value ReturnValue;
+    typedef Value ConstReturnValue;
+    typedef Value ReturnValue;
   };
 
   template <typename Map>
@@ -252,8 +252,8 @@
     typedef typename MatrixMap::SecondKey SecondKey;
     typedef typename MatrixMap::Value Value;
 
-    typedef const Value ConstReturnValue;
-    typedef const Value ReturnValue;
+    typedef Value ConstReturnValue;
+    typedef Value ReturnValue;
   };
 
   template <typename MatrixMap>
diff -r 5222a3c470ed -r 6aa6fcaeaea5 lemon/circulation.h
--- a/lemon/circulation.h	Tue Jul 22 11:29:57 2008 +0000
+++ b/lemon/circulation.h	Fri Sep 19 15:14:41 2008 +0000
@@ -88,7 +88,7 @@
     ///
     /// \sa Elevator
     /// \sa LinkedElevator
-    typedef Elevator<Graph, typename Graph::Node> Elevator;
+    typedef lemon::Elevator<Graph, typename Graph::Node> Elevator;
     
     /// \brief Instantiates an Elevator.
     ///
@@ -102,7 +102,7 @@
     /// \brief The tolerance used by the algorithm
     ///
     /// The tolerance used by the algorithm to handle inexact computation.
-    typedef Tolerance<Value> Tolerance;
+    typedef lemon::Tolerance<Value> Tolerance;
 
   };
   
diff -r 5222a3c470ed -r 6aa6fcaeaea5 lemon/dijkstra.h
--- a/lemon/dijkstra.h	Tue Jul 22 11:29:57 2008 +0000
+++ b/lemon/dijkstra.h	Fri Sep 19 15:14:41 2008 +0000
@@ -31,6 +31,8 @@
 #include <lemon/error.h>
 #include <lemon/maps.h>
 
+#include <limits>
+
 
 namespace lemon {
 
diff -r 5222a3c470ed -r 6aa6fcaeaea5 lemon/edge_set.h
--- a/lemon/edge_set.h	Tue Jul 22 11:29:57 2008 +0000
+++ b/lemon/edge_set.h	Fri Sep 19 15:14:41 2008 +0000
@@ -154,7 +154,7 @@
     void first(Edge& edge) const {
       Node node;
       for (first(node); node != INVALID && (*nodes)[node].first_in == -1; 
-	   next(node));
+	   next(node)) { }
       edge.id = (node == INVALID) ? -1 : (*nodes)[node].first_in;
     }
 
@@ -164,7 +164,7 @@
       } else {
 	Node node = edges[edge.id].target;
 	for (next(node); node != INVALID && (*nodes)[node].first_in == -1; 
-	     next(node));
+	     next(node)) { }
 	edge.id = (node == INVALID) ? -1 : (*nodes)[node].first_in;
       }      
     }
diff -r 5222a3c470ed -r 6aa6fcaeaea5 lemon/graph_to_eps.h
--- a/lemon/graph_to_eps.h	Tue Jul 22 11:29:57 2008 +0000
+++ b/lemon/graph_to_eps.h	Fri Sep 19 15:14:41 2008 +0000
@@ -1001,7 +1001,7 @@
       }
       else for(EdgeIt e(g);e!=INVALID;++e)
 	if((!_undirected||g.source(e)<g.target(e))&&_edgeWidths[e]>0
-	   &&g.source(e)!=g.target(e))
+	   &&g.source(e)!=g.target(e)) {
 	  if(_drawArrows) {
 	    dim2::Point<double> d(mycoords[g.target(e)]-mycoords[g.source(e)]);
 	    double rn=_nodeSizes[g.target(e)]*_nodeScale;
@@ -1030,6 +1030,7 @@
 		  << _edgeColors[e].green() << ' '
 		  << _edgeColors[e].blue() << ' '
 		  << _edgeWidths[e]*_edgeWidthScale << " l\n";
+	}
       os << "grestore\n";
     }
     if(_showNodes) {
diff -r 5222a3c470ed -r 6aa6fcaeaea5 lemon/lemon_reader.h
--- a/lemon/lemon_reader.h	Tue Jul 22 11:29:57 2008 +0000
+++ b/lemon/lemon_reader.h	Fri Sep 19 15:14:41 2008 +0000
@@ -3472,7 +3472,7 @@
       while (ls >> name) {
 	maps.push_back(name);
       }
-      while (getline(is, line));
+      while (getline(is, line)) { }
     }
 
     void readItemNames(std::istream& is, std::vector<std::string>& maps) {
diff -r 5222a3c470ed -r 6aa6fcaeaea5 lemon/list_graph.h
--- a/lemon/list_graph.h	Tue Jul 22 11:29:57 2008 +0000
+++ b/lemon/list_graph.h	Fri Sep 19 15:14:41 2008 +0000
@@ -118,7 +118,7 @@
       int n;
       for(n = first_node; 
 	  n!=-1 && nodes[n].first_in == -1; 
-	  n = nodes[n].next);
+	  n = nodes[n].next) { }
       e.id = (n == -1) ? -1 : nodes[n].first_in;
     }
 
@@ -128,8 +128,8 @@
       } else {
 	int n;
 	for(n = nodes[edges[edge.id].target].next;
-	  n!=-1 && nodes[n].first_in == -1; 
-	  n = nodes[n].next);
+	    n!=-1 && nodes[n].first_in == -1; 
+	    n = nodes[n].next) { }
 	edge.id = (n == -1) ? -1 : nodes[n].first_in;
       }      
     }
diff -r 5222a3c470ed -r 6aa6fcaeaea5 lemon/lp_base.h
--- a/lemon/lp_base.h	Tue Jul 22 11:29:57 2008 +0000
+++ b/lemon/lp_base.h	Fri Sep 19 15:14:41 2008 +0000
@@ -43,9 +43,9 @@
   bool isFinite(T value)
   {
     typedef std::numeric_limits<T> Lim;
-    if (Lim::has_infinity && (value == Lim::infinity() || value ==
-          -Lim::infinity()) ||
-        (Lim::has_quiet_NaN || Lim::has_signaling_NaN) && value != value)
+    if ((Lim::has_infinity && (value == Lim::infinity() || value ==
+			       -Lim::infinity())) ||
+        ((Lim::has_quiet_NaN || Lim::has_signaling_NaN) && value != value))
     {
       return false;
     }
diff -r 5222a3c470ed -r 6aa6fcaeaea5 lemon/min_mean_cycle.h
--- a/lemon/min_mean_cycle.h	Tue Jul 22 11:29:57 2008 +0000
+++ b/lemon/min_mean_cycle.h	Fri Sep 19 15:14:41 2008 +0000
@@ -55,7 +55,7 @@
     GRAPH_TYPEDEFS(typename Graph);
 
     typedef typename LengthMap::Value Length;
-    typedef Path<Graph> Path;
+    typedef lemon::Path<Graph> Path;
 
   private:
 
diff -r 5222a3c470ed -r 6aa6fcaeaea5 lemon/preflow.h
--- a/lemon/preflow.h	Tue Jul 22 11:29:57 2008 +0000
+++ b/lemon/preflow.h	Fri Sep 19 15:14:41 2008 +0000
@@ -86,7 +86,7 @@
     /// \brief The tolerance used by the algorithm
     ///
     /// The tolerance used by the algorithm to handle inexact computation.
-    typedef Tolerance<Value> Tolerance;
+    typedef lemon::Tolerance<Value> Tolerance;
 
   };
   
diff -r 5222a3c470ed -r 6aa6fcaeaea5 lemon/random.h
--- a/lemon/random.h	Tue Jul 22 11:29:57 2008 +0000
+++ b/lemon/random.h	Fri Sep 19 15:14:41 2008 +0000
@@ -67,6 +67,7 @@
 #include <vector>
 
 #include <ctime>
+#include <limits>
 
 #include <lemon/math.h>
 #include <lemon/dim2.h>
diff -r 5222a3c470ed -r 6aa6fcaeaea5 test/bipartite_matching_test.cc
--- a/test/bipartite_matching_test.cc	Tue Jul 22 11:29:57 2008 +0000
+++ b/test/bipartite_matching_test.cc	Fri Sep 19 15:14:41 2008 +0000
@@ -195,7 +195,7 @@
     MaxBipartiteMatching<Graph> bpmatch(graph);
 
     bpmatch.greedyInit();
-    while (bpmatch.simpleAugment());
+    while (bpmatch.simpleAugment()) { }
     
     Graph::UEdgeMap<bool> mm(graph);
     Graph::NodeMap<bool> cs(graph);
diff -r 5222a3c470ed -r 6aa6fcaeaea5 tools/lgf-gen.cc
--- a/tools/lgf-gen.cc	Tue Jul 22 11:29:57 2008 +0000
+++ b/tools/lgf-gen.cc	Fri Sep 19 15:14:41 2008 +0000
@@ -120,7 +120,7 @@
   Node v2=v;
   do {
     Node n;
-    for(IncEdgeIt e(g,v2);(n=g.runningNode(e))==u2;++e);
+    for(IncEdgeIt e(g,v2);(n=g.runningNode(e))==u2;++e) { }
     u2=v2;
     v2=n;
     if(luv+std::sqrt((coords[v2]-coords[u2]).normSquare())-EPSILON>