[Lemon-commits] [lemon_svn] alpar: r1975 - in hugo/trunk: gui lemon lemon/concept test
Lemon SVN
svn at lemon.cs.elte.hu
Mon Nov 6 20:49:12 CET 2006
Author: alpar
Date: Wed Jun 15 12:19:44 2005
New Revision: 1975
Modified:
hugo/trunk/gui/edit_win.cc
hugo/trunk/lemon/concept/graph_component.h
hugo/trunk/lemon/concept/heap.h
hugo/trunk/lemon/graph_to_eps.h
hugo/trunk/lemon/lemon_reader.h
hugo/trunk/lemon/lemon_writer.h
hugo/trunk/test/max_matching_test.cc
Log:
gcc-4.0 compatibility changes
coloring.cc still generates warnings. Don't know why.
Modified: hugo/trunk/gui/edit_win.cc
==============================================================================
--- hugo/trunk/gui/edit_win.cc (original)
+++ hugo/trunk/gui/edit_win.cc Wed Jun 15 12:19:44 2005
@@ -18,7 +18,7 @@
signal_key_press_event().connect(sigc::mem_fun(*this, &EditWin::close_if_escape_is_pressed));
//buttons array
- buttons=new (Gtk::RadioButton *) [TOOL_NUM];
+ buttons=new Gtk::RadioButton * [TOOL_NUM];
for(int i=0;i<TOOL_NUM;i++)
{
buttons[i]=NULL;
Modified: hugo/trunk/lemon/concept/graph_component.h
==============================================================================
--- hugo/trunk/lemon/concept/graph_component.h (original)
+++ hugo/trunk/lemon/concept/graph_component.h Wed Jun 15 12:19:44 2005
@@ -408,6 +408,7 @@
checkConcept<BaseGraphComponent, _Graph >();
typename _Graph::Node node_a, node_b;
node_a = graph.addNode();
+ node_b = graph.addNode();
typename _Graph::Edge edge;
edge = graph.addEdge(node_a, node_b);
}
@@ -927,6 +928,7 @@
checkConcept<BaseGraphComponent, _Graph >();
typename _Graph::Node node_a, node_b;
node_a = graph.addNode();
+ node_b = graph.addNode();
typename _Graph::Edge edge;
edge = graph.addEdge(node_a, node_b);
}
Modified: hugo/trunk/lemon/concept/heap.h
==============================================================================
--- hugo/trunk/lemon/concept/heap.h (original)
+++ hugo/trunk/lemon/concept/heap.h Wed Jun 15 12:19:44 2005
@@ -155,6 +155,9 @@
Item item;
Prio prio;
+ item=Item();
+ prio=Prio();
+
ignore_unused_variable_warning(item);
ignore_unused_variable_warning(prio);
Modified: hugo/trunk/lemon/graph_to_eps.h
==============================================================================
--- hugo/trunk/lemon/graph_to_eps.h (original)
+++ hugo/trunk/lemon/graph_to_eps.h Wed Jun 15 12:19:44 2005
@@ -330,10 +330,10 @@
typedef typename Graph::InEdgeIt InEdgeIt;
typedef typename Graph::OutEdgeIt OutEdgeIt;
- static const int INTERPOL_PREC=20;
- static const double A4HEIGHT = 841.8897637795276;
- static const double A4WIDTH = 595.275590551181;
- static const double A4BORDER = 15;
+ static const int INTERPOL_PREC;
+ static const double A4HEIGHT;
+ static const double A4WIDTH;
+ static const double A4BORDER;
bool dontPrint;
@@ -705,8 +705,9 @@
ctime_r(&tv.tv_sec,cbuf);
os << "%%CreationDate: " << cbuf;
}
- ///\todo: Chech whether the graph is empty.
BoundingBox<double> bb;
+ ///\bug: Chech whether the graph is empty.
+ if(NodeIt(g)==INVALID) bb+=xy<double>(0,0);
for(NodeIt n(g);n!=INVALID;++n) {
double ns=_nodeSizes[n]*_nodeScale;
xy<double> p(ns,ns);
@@ -975,6 +976,15 @@
}
};
+template<class T>
+const int GraphToEps<T>::INTERPOL_PREC = 20;
+template<class T>
+const double GraphToEps<T>::A4HEIGHT = 841.8897637795276;
+template<class T>
+const double GraphToEps<T>::A4WIDTH = 595.275590551181;
+template<class T>
+const double GraphToEps<T>::A4BORDER = 15;
+
///Generates an EPS file from a graph
Modified: hugo/trunk/lemon/lemon_reader.h
==============================================================================
--- hugo/trunk/lemon/lemon_reader.h (original)
+++ hugo/trunk/lemon/lemon_reader.h Wed Jun 15 12:19:44 2005
@@ -310,6 +310,8 @@
reader.attach(*this);
}
+ virtual ~SectionReader() {}
+
/// \brief Gives back true when the SectionReader can process
/// the section with the given header line.
///
@@ -571,6 +573,7 @@
class IdReaderBase {
public:
typedef _Item Item;
+ virtual ~IdReaderBase() {}
virtual Item read(std::istream& is) const = 0;
virtual bool isIdReader() const = 0;
};
@@ -600,6 +603,7 @@
class ValueReaderBase {
public:
virtual void read(std::istream&) {};
+ virtual ~ValueReaderBase() {}
};
template <typename _Value, typename _Reader>
Modified: hugo/trunk/lemon/lemon_writer.h
==============================================================================
--- hugo/trunk/lemon/lemon_writer.h (original)
+++ hugo/trunk/lemon/lemon_writer.h Wed Jun 15 12:19:44 2005
@@ -131,6 +131,8 @@
SectionWriter(LemonWriter& writer) {
writer.attach(*this);
}
+
+ virtual ~SectionWriter() {}
/// \brief The header of section.
///
@@ -250,6 +252,7 @@
class ValueWriterBase {
public:
+ virtual ~ValueWriterBase() {}
virtual void write(std::ostream&) = 0;
};
@@ -275,6 +278,7 @@
class IdWriterBase {
public:
typedef _Item Item;
+ virtual ~IdWriterBase() {}
virtual void write(std::ostream&, const Item&) const = 0;
virtual bool isIdWriter() const = 0;
};
Modified: hugo/trunk/test/max_matching_test.cc
==============================================================================
--- hugo/trunk/test/max_matching_test.cc (original)
+++ hugo/trunk/test/max_matching_test.cc Wed Jun 15 12:19:44 2005
@@ -18,7 +18,7 @@
#include <iostream>
#include <vector>
#include <queue>
-#include <math.h>
+#include <cmath>
#include <cstdlib>
#include "test_tools.h"
More information about the Lemon-commits
mailing list