[Lemon-commits] deba: r3504 - in lemon/trunk: lemon lemon/bits test tools
Lemon SVN
svn at lemon.cs.elte.hu
Fri Sep 19 17:14:43 CEST 2008
Author: deba
Date: Fri Sep 19 17:14:41 2008
New Revision: 3504
Modified:
lemon/trunk/lemon/bits/bezier.h
lemon/trunk/lemon/bits/traits.h
lemon/trunk/lemon/circulation.h
lemon/trunk/lemon/dijkstra.h
lemon/trunk/lemon/edge_set.h
lemon/trunk/lemon/graph_to_eps.h
lemon/trunk/lemon/lemon_reader.h
lemon/trunk/lemon/list_graph.h
lemon/trunk/lemon/lp_base.h
lemon/trunk/lemon/min_mean_cycle.h
lemon/trunk/lemon/preflow.h
lemon/trunk/lemon/random.h
lemon/trunk/test/bipartite_matching_test.cc
lemon/trunk/tools/lgf-gen.cc
Log:
G++-4.3 compatibility changes
Modified: lemon/trunk/lemon/bits/bezier.h
==============================================================================
--- lemon/trunk/lemon/bits/bezier.h (original)
+++ lemon/trunk/lemon/bits/bezier.h Fri Sep 19 17:14:41 2008
@@ -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;}
};
Modified: lemon/trunk/lemon/bits/traits.h
==============================================================================
--- lemon/trunk/lemon/bits/traits.h (original)
+++ lemon/trunk/lemon/bits/traits.h Fri Sep 19 17:14:41 2008
@@ -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>
Modified: lemon/trunk/lemon/circulation.h
==============================================================================
--- lemon/trunk/lemon/circulation.h (original)
+++ lemon/trunk/lemon/circulation.h Fri Sep 19 17:14:41 2008
@@ -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;
};
Modified: lemon/trunk/lemon/dijkstra.h
==============================================================================
--- lemon/trunk/lemon/dijkstra.h (original)
+++ lemon/trunk/lemon/dijkstra.h Fri Sep 19 17:14:41 2008
@@ -31,6 +31,8 @@
#include <lemon/error.h>
#include <lemon/maps.h>
+#include <limits>
+
namespace lemon {
Modified: lemon/trunk/lemon/edge_set.h
==============================================================================
--- lemon/trunk/lemon/edge_set.h (original)
+++ lemon/trunk/lemon/edge_set.h Fri Sep 19 17:14:41 2008
@@ -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;
}
}
Modified: lemon/trunk/lemon/graph_to_eps.h
==============================================================================
--- lemon/trunk/lemon/graph_to_eps.h (original)
+++ lemon/trunk/lemon/graph_to_eps.h Fri Sep 19 17:14:41 2008
@@ -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) {
Modified: lemon/trunk/lemon/lemon_reader.h
==============================================================================
--- lemon/trunk/lemon/lemon_reader.h (original)
+++ lemon/trunk/lemon/lemon_reader.h Fri Sep 19 17:14:41 2008
@@ -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) {
Modified: lemon/trunk/lemon/list_graph.h
==============================================================================
--- lemon/trunk/lemon/list_graph.h (original)
+++ lemon/trunk/lemon/list_graph.h Fri Sep 19 17:14:41 2008
@@ -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;
}
}
Modified: lemon/trunk/lemon/lp_base.h
==============================================================================
--- lemon/trunk/lemon/lp_base.h (original)
+++ lemon/trunk/lemon/lp_base.h Fri Sep 19 17:14:41 2008
@@ -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;
}
Modified: lemon/trunk/lemon/min_mean_cycle.h
==============================================================================
--- lemon/trunk/lemon/min_mean_cycle.h (original)
+++ lemon/trunk/lemon/min_mean_cycle.h Fri Sep 19 17:14:41 2008
@@ -55,7 +55,7 @@
GRAPH_TYPEDEFS(typename Graph);
typedef typename LengthMap::Value Length;
- typedef Path<Graph> Path;
+ typedef lemon::Path<Graph> Path;
private:
Modified: lemon/trunk/lemon/preflow.h
==============================================================================
--- lemon/trunk/lemon/preflow.h (original)
+++ lemon/trunk/lemon/preflow.h Fri Sep 19 17:14:41 2008
@@ -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;
};
Modified: lemon/trunk/lemon/random.h
==============================================================================
--- lemon/trunk/lemon/random.h (original)
+++ lemon/trunk/lemon/random.h Fri Sep 19 17:14:41 2008
@@ -67,6 +67,7 @@
#include <vector>
#include <ctime>
+#include <limits>
#include <lemon/math.h>
#include <lemon/dim2.h>
Modified: lemon/trunk/test/bipartite_matching_test.cc
==============================================================================
--- lemon/trunk/test/bipartite_matching_test.cc (original)
+++ lemon/trunk/test/bipartite_matching_test.cc Fri Sep 19 17:14:41 2008
@@ -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);
Modified: lemon/trunk/tools/lgf-gen.cc
==============================================================================
--- lemon/trunk/tools/lgf-gen.cc (original)
+++ lemon/trunk/tools/lgf-gen.cc Fri Sep 19 17:14:41 2008
@@ -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>
More information about the Lemon-commits
mailing list