summaryrefslogtreecommitdiffstats
path: root/src/libcola
diff options
context:
space:
mode:
authorJohan B. C. Engelen <jbc.engelen@swissonline.ch>2007-11-04 01:01:15 +0000
committerjohanengelen <johanengelen@users.sourceforge.net>2007-11-04 01:01:15 +0000
commite36b55fc22df7631393784974077c5f7a1b00e67 (patch)
tree23d9394249fa9b6e95817a473b422dc3126cb53c /src/libcola
parentFix bug [ 1811188 ] save as PS/EPS crashes (diff)
downloadinkscape-e36b55fc22df7631393784974077c5f7a1b00e67.tar.gz
inkscape-e36b55fc22df7631393784974077c5f7a1b00e67.zip
Add virtual to a lot of the destructors. Note: perhaps it will have to be reverted for some files to keep them C-compatible.
(bzr r4024)
Diffstat (limited to 'src/libcola')
-rw-r--r--src/libcola/cola.h4
-rw-r--r--src/libcola/cycle_detector.h4
-rw-r--r--src/libcola/gradient_projection.h2
-rw-r--r--src/libcola/straightener.h4
4 files changed, 7 insertions, 7 deletions
diff --git a/src/libcola/cola.h b/src/libcola/cola.h
index b56d2327e..eda64cb5f 100644
--- a/src/libcola/cola.h
+++ b/src/libcola/cola.h
@@ -28,7 +28,7 @@ namespace cola {
vector<Rectangle*> rects;
vector<Edge> edges;
SimpleConstraints scx, scy;
- ~Component();
+ virtual ~Component();
void moveRectangles(double x, double y);
Rectangle* getBoundingBox();
};
@@ -174,7 +174,7 @@ namespace cola {
void setupDummyVars();
- ~ConstrainedMajorizationLayout() {
+ virtual ~ConstrainedMajorizationLayout() {
if(boundingBoxes) {
delete [] boundingBoxes;
}
diff --git a/src/libcola/cycle_detector.h b/src/libcola/cycle_detector.h
index fcb8722fe..18286ac50 100644
--- a/src/libcola/cycle_detector.h
+++ b/src/libcola/cycle_detector.h
@@ -21,13 +21,13 @@ class Node {
StatusType status;
Node(unsigned id) { this->id = id; cyclicAncestor = NULL; status = NotVisited; }
- ~Node() {}
+ virtual ~Node() {}
};
class CycleDetector {
public:
CycleDetector(unsigned numVertices, Edges *edges);
- ~CycleDetector();
+ virtual ~CycleDetector();
std::vector<bool> *detect_cycles();
void mod_graph(unsigned numVertices, Edges *edges);
unsigned getV() { return this->V; }
diff --git a/src/libcola/gradient_projection.h b/src/libcola/gradient_projection.h
index 9ee3ff5c5..4ef68fc2e 100644
--- a/src/libcola/gradient_projection.h
+++ b/src/libcola/gradient_projection.h
@@ -223,7 +223,7 @@ public:
constrained=true;
}
}
- ~GradientProjection() {
+ virtual ~GradientProjection() {
delete [] g;
delete [] d;
delete [] old_place;
diff --git a/src/libcola/straightener.h b/src/libcola/straightener.h
index e2c50a3a6..934be45ba 100644
--- a/src/libcola/straightener.h
+++ b/src/libcola/straightener.h
@@ -10,7 +10,7 @@
namespace straightener {
struct Route {
Route(unsigned n) : n(n), xs(new double[n]), ys(new double[n]) {}
- ~Route() {
+ virtual ~Route() {
delete [] xs;
delete [] ys;
}
@@ -42,7 +42,7 @@ namespace straightener {
{
route->boundingBox(xmin,ymin,xmax,ymax);
}
- ~Edge() {
+ virtual ~Edge() {
delete route;
}
void setRoute(Route* r) {