diff options
Diffstat (limited to 'src/libcola')
| -rw-r--r-- | src/libcola/cola.h | 4 | ||||
| -rw-r--r-- | src/libcola/cycle_detector.h | 4 | ||||
| -rw-r--r-- | src/libcola/gradient_projection.h | 2 | ||||
| -rw-r--r-- | src/libcola/straightener.h | 4 |
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) { |
