From 94ac0feb38c75d489a786bf227afdaf4084ae339 Mon Sep 17 00:00:00 2001 From: Matthew D Jones <Matthew.D.Jones@tessella.com> Date: Thu, 13 Aug 2015 10:29:19 +0100 Subject: [PATCH] Re #11422 Added virtual destructors to ScaleEngine --- Code/Mantid/MantidPlot/src/plot2D/ScaleEngine.cpp | 4 ++++ Code/Mantid/MantidPlot/src/plot2D/ScaleEngine.h | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/Code/Mantid/MantidPlot/src/plot2D/ScaleEngine.cpp b/Code/Mantid/MantidPlot/src/plot2D/ScaleEngine.cpp index 3d83e0defaf..20028f5eeac 100644 --- a/Code/Mantid/MantidPlot/src/plot2D/ScaleEngine.cpp +++ b/Code/Mantid/MantidPlot/src/plot2D/ScaleEngine.cpp @@ -35,6 +35,8 @@ QwtScaleTransformation* ScaleEngine::transformation() const return new ScaleTransformation(this); } +ScaleTransformation::~ScaleTransformation() {} + double ScaleTransformation::invXForm(double p, double p1, double p2, double s1, double s2) const { if (!d_engine->hasBreak()){ @@ -217,6 +219,8 @@ d_break_decoration(true), d_nth_power(2.0) {} +ScaleEngine::~ScaleEngine() {} + bool ScaleEngine::hasBreak() const { return (d_break_left == d_break_right || (d_break_left == -DBL_MAX && d_break_right == DBL_MAX))?false:true; diff --git a/Code/Mantid/MantidPlot/src/plot2D/ScaleEngine.h b/Code/Mantid/MantidPlot/src/plot2D/ScaleEngine.h index 2143777c9a0..39bd94983a7 100644 --- a/Code/Mantid/MantidPlot/src/plot2D/ScaleEngine.h +++ b/Code/Mantid/MantidPlot/src/plot2D/ScaleEngine.h @@ -44,6 +44,7 @@ public: virtual double xForm(double x, double, double, double p1, double p2) const; virtual double invXForm(double x, double s1, double s2, double p1, double p2) const; QwtScaleTransformation* copy() const; + virtual ~ScaleTransformation(); protected: QwtScaleTransformation* newScaleTransformation() const; @@ -56,6 +57,9 @@ class ScaleEngine: public QwtScaleEngine public: ScaleEngine(ScaleTransformation::Type type = ScaleTransformation::Linear, double left_break = -DBL_MAX, double right_break = DBL_MAX); + + virtual ~ScaleEngine(); + QwtScaleTransformation* transformation() const; virtual QwtScaleDiv divideScale(double x1, double x2, int maxMajSteps, int maxMinSteps, double stepSize = 0.0) const; -- GitLab