gcc-4.0 compatibility changes
authoralpar
Wed, 15 Jun 2005 10:19:44 +0000
changeset 1494ae55ba000ebb
parent 1493 94535d1833b5
child 1495 71676735a6ef
gcc-4.0 compatibility changes
coloring.cc still generates warnings. Don't know why.
gui/edit_win.cc
lemon/concept/graph_component.h
lemon/concept/heap.h
lemon/graph_to_eps.h
lemon/lemon_reader.h
lemon/lemon_writer.h
test/max_matching_test.cc
     1.1 --- a/gui/edit_win.cc	Wed Jun 15 10:13:08 2005 +0000
     1.2 +++ b/gui/edit_win.cc	Wed Jun 15 10:19:44 2005 +0000
     1.3 @@ -18,7 +18,7 @@
     1.4    signal_key_press_event().connect(sigc::mem_fun(*this, &EditWin::close_if_escape_is_pressed));
     1.5    
     1.6    //buttons array
     1.7 -  buttons=new (Gtk::RadioButton *) [TOOL_NUM];
     1.8 +  buttons=new Gtk::RadioButton * [TOOL_NUM];
     1.9    for(int i=0;i<TOOL_NUM;i++)
    1.10      {
    1.11        buttons[i]=NULL;
     2.1 --- a/lemon/concept/graph_component.h	Wed Jun 15 10:13:08 2005 +0000
     2.2 +++ b/lemon/concept/graph_component.h	Wed Jun 15 10:19:44 2005 +0000
     2.3 @@ -408,6 +408,7 @@
     2.4  	  checkConcept<BaseGraphComponent, _Graph >();
     2.5  	  typename _Graph::Node node_a, node_b;
     2.6  	  node_a = graph.addNode();
     2.7 +	  node_b = graph.addNode();
     2.8  	  typename _Graph::Edge edge;
     2.9  	  edge = graph.addEdge(node_a, node_b);
    2.10  	}
    2.11 @@ -927,6 +928,7 @@
    2.12  	  checkConcept<BaseGraphComponent, _Graph >();
    2.13  	  typename _Graph::Node node_a, node_b;
    2.14  	  node_a = graph.addNode();
    2.15 +	  node_b = graph.addNode();
    2.16  	  typename _Graph::Edge edge;
    2.17  	  edge = graph.addEdge(node_a, node_b);      
    2.18  	}
     3.1 --- a/lemon/concept/heap.h	Wed Jun 15 10:13:08 2005 +0000
     3.2 +++ b/lemon/concept/heap.h	Wed Jun 15 10:19:44 2005 +0000
     3.3 @@ -155,6 +155,9 @@
     3.4  	  Item item;
     3.5  	  Prio prio;
     3.6  
     3.7 +	  item=Item();
     3.8 +	  prio=Prio();
     3.9 +
    3.10  	  ignore_unused_variable_warning(item);
    3.11  	  ignore_unused_variable_warning(prio);
    3.12  
     4.1 --- a/lemon/graph_to_eps.h	Wed Jun 15 10:13:08 2005 +0000
     4.2 +++ b/lemon/graph_to_eps.h	Wed Jun 15 10:19:44 2005 +0000
     4.3 @@ -330,10 +330,10 @@
     4.4    typedef typename Graph::InEdgeIt InEdgeIt;
     4.5    typedef typename Graph::OutEdgeIt OutEdgeIt;
     4.6  
     4.7 -  static const int INTERPOL_PREC=20;
     4.8 -  static const double A4HEIGHT = 841.8897637795276;
     4.9 -  static const double A4WIDTH  = 595.275590551181;
    4.10 -  static const double A4BORDER = 15;
    4.11 +  static const int INTERPOL_PREC;
    4.12 +  static const double A4HEIGHT;
    4.13 +  static const double A4WIDTH;
    4.14 +  static const double A4BORDER;
    4.15  
    4.16    bool dontPrint;
    4.17  
    4.18 @@ -705,8 +705,9 @@
    4.19        ctime_r(&tv.tv_sec,cbuf);
    4.20        os << "%%CreationDate: " << cbuf;
    4.21      }
    4.22 -    ///\todo: Chech whether the graph is empty.
    4.23      BoundingBox<double> bb;
    4.24 +    ///\bug: Chech whether the graph is empty.
    4.25 +    if(NodeIt(g)==INVALID) bb+=xy<double>(0,0);
    4.26      for(NodeIt n(g);n!=INVALID;++n) {
    4.27        double ns=_nodeSizes[n]*_nodeScale;
    4.28        xy<double> p(ns,ns);
    4.29 @@ -975,6 +976,15 @@
    4.30    } 
    4.31  };
    4.32  
    4.33 +template<class T>
    4.34 +const int GraphToEps<T>::INTERPOL_PREC = 20;
    4.35 +template<class T>
    4.36 +const double GraphToEps<T>::A4HEIGHT = 841.8897637795276;
    4.37 +template<class T>
    4.38 +const double GraphToEps<T>::A4WIDTH  = 595.275590551181;
    4.39 +template<class T>
    4.40 +const double GraphToEps<T>::A4BORDER = 15;
    4.41 +
    4.42  
    4.43  ///Generates an EPS file from a graph
    4.44  
     5.1 --- a/lemon/lemon_reader.h	Wed Jun 15 10:13:08 2005 +0000
     5.2 +++ b/lemon/lemon_reader.h	Wed Jun 15 10:19:44 2005 +0000
     5.3 @@ -310,6 +310,8 @@
     5.4  	reader.attach(*this);
     5.5        }
     5.6  
     5.7 +      virtual ~SectionReader() {}
     5.8 +
     5.9        /// \brief Gives back true when the SectionReader can process 
    5.10        /// the section with the given header line.
    5.11        ///
    5.12 @@ -571,6 +573,7 @@
    5.13      class IdReaderBase {
    5.14      public:
    5.15        typedef _Item Item;
    5.16 +      virtual ~IdReaderBase() {}
    5.17        virtual Item read(std::istream& is) const = 0;
    5.18        virtual bool isIdReader() const = 0;
    5.19      };
    5.20 @@ -600,6 +603,7 @@
    5.21      class ValueReaderBase {
    5.22      public:
    5.23        virtual void read(std::istream&) {};
    5.24 +      virtual ~ValueReaderBase() {}
    5.25      };
    5.26  
    5.27      template <typename _Value, typename _Reader>
     6.1 --- a/lemon/lemon_writer.h	Wed Jun 15 10:13:08 2005 +0000
     6.2 +++ b/lemon/lemon_writer.h	Wed Jun 15 10:19:44 2005 +0000
     6.3 @@ -131,6 +131,8 @@
     6.4        SectionWriter(LemonWriter& writer) {
     6.5  	writer.attach(*this);
     6.6        }
     6.7 +      
     6.8 +      virtual ~SectionWriter() {}
     6.9  
    6.10        /// \brief The header of section.
    6.11        ///
    6.12 @@ -250,6 +252,7 @@
    6.13  
    6.14      class ValueWriterBase {
    6.15      public:
    6.16 +      virtual ~ValueWriterBase() {}
    6.17        virtual void write(std::ostream&) = 0;
    6.18      };
    6.19  
    6.20 @@ -275,6 +278,7 @@
    6.21      class IdWriterBase {
    6.22      public:
    6.23        typedef _Item Item;
    6.24 +      virtual ~IdWriterBase() {}
    6.25        virtual void write(std::ostream&, const Item&) const = 0;
    6.26        virtual bool isIdWriter() const = 0;
    6.27      };
     7.1 --- a/test/max_matching_test.cc	Wed Jun 15 10:13:08 2005 +0000
     7.2 +++ b/test/max_matching_test.cc	Wed Jun 15 10:19:44 2005 +0000
     7.3 @@ -18,7 +18,7 @@
     7.4  #include <iostream>
     7.5  #include <vector>
     7.6  #include <queue>
     7.7 -#include <math.h>
     7.8 +#include <cmath>
     7.9  #include <cstdlib>
    7.10  
    7.11  #include "test_tools.h"