# HG changeset patch # User Alpar Juttner # Date 1206631643 -3600 # Node ID 716b220697a00d88556c5c9138c8bad2ecc40def # Parent 0c6556a8e1053e483f829338b701d57536183886 Fix gcc-4.3 compilation errors and warnings diff -r 0c6556a8e105 -r 716b220697a0 lemon/bits/bezier.h --- a/lemon/bits/bezier.h Fri Jun 20 11:09:30 2008 +0100 +++ b/lemon/bits/bezier.h Thu Mar 27 16:27:23 2008 +0100 @@ -32,7 +32,7 @@ class BezierBase { public: - typedef Point Point; + typedef lemon::dim2::Point Point; protected: static Point conv(Point x,Point y,double t) {return (1-t)*x+t*y;} }; diff -r 0c6556a8e105 -r 716b220697a0 lemon/bits/traits.h --- a/lemon/bits/traits.h Fri Jun 20 11:09:30 2008 +0100 +++ b/lemon/bits/traits.h Thu Mar 27 16:27:23 2008 +0100 @@ -150,8 +150,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 @@ -178,8 +178,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 diff -r 0c6556a8e105 -r 716b220697a0 lemon/dijkstra.h --- a/lemon/dijkstra.h Fri Jun 20 11:09:30 2008 +0100 +++ b/lemon/dijkstra.h Thu Mar 27 16:27:23 2008 +0100 @@ -23,6 +23,7 @@ ///\file ///\brief Dijkstra algorithm. +#include #include #include #include diff -r 0c6556a8e105 -r 716b220697a0 lemon/graph_to_eps.h --- a/lemon/graph_to_eps.h Fri Jun 20 11:09:30 2008 +0100 +++ b/lemon/graph_to_eps.h Thu Mar 27 16:27:23 2008 +0100 @@ -1015,7 +1015,7 @@ } else for(ArcIt e(g);e!=INVALID;++e) if((!_undirected||g.source(e)0 - &&g.source(e)!=g.target(e)) + &&g.source(e)!=g.target(e)) { if(_drawArrows) { dim2::Point d(mycoords[g.target(e)]-mycoords[g.source(e)]); double rn=_nodeSizes[g.target(e)]*_nodeScale; @@ -1035,7 +1035,7 @@ << _arcColors[e].red() << ' ' << _arcColors[e].green() << ' ' << _arcColors[e].blue() << " arr\n"; - } + } else os << mycoords[g.source(e)].x << ' ' << mycoords[g.source(e)].y << ' ' << mycoords[g.target(e)].x << ' ' @@ -1044,6 +1044,7 @@ << _arcColors[e].green() << ' ' << _arcColors[e].blue() << ' ' << _arcWidths[e]*_arcWidthScale << " l\n"; + } os << "grestore\n"; } if(_showNodes) { diff -r 0c6556a8e105 -r 716b220697a0 lemon/list_graph.h --- a/lemon/list_graph.h Fri Jun 20 11:09:30 2008 +0100 +++ b/lemon/list_graph.h Thu Mar 27 16:27:23 2008 +0100 @@ -115,7 +115,7 @@ int n; for(n = first_node; n!=-1 && nodes[n].first_in == -1; - n = nodes[n].next); + n = nodes[n].next) {} arc.id = (n == -1) ? -1 : nodes[n].first_in; } @@ -125,8 +125,8 @@ } else { int n; for(n = nodes[arcs[arc.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) {} arc.id = (n == -1) ? -1 : nodes[n].first_in; } } diff -r 0c6556a8e105 -r 716b220697a0 test/test_tools.h --- a/test/test_tools.h Fri Jun 20 11:09:30 2008 +0100 +++ b/test/test_tools.h Thu Mar 27 16:27:23 2008 +0100 @@ -24,6 +24,7 @@ ///\brief Some utilities to write test programs. #include +#include ///If \c rc is fail, writes an error message and exits. @@ -36,8 +37,6 @@ ///\code check(0==1,"This is obviously false.");\endcode will ///print something like this (and then exits). ///\verbatim file_name.cc:123: error: This is obviously false. \endverbatim -/// -///\todo It should be in \c assert.h #define check(rc, msg) \ if(!(rc)) { \ std::cerr << __FILE__ ":" << __LINE__ << ": error: " << msg << std::endl; \