From 39f32f2a1487ab7362b366a8851757c8151696bc Mon Sep 17 00:00:00 2001 From: Piotr Dziwinski Date: Fri, 23 Mar 2012 21:19:34 +0100 Subject: Fixes for CControl derived classes CControl has a virtual destructor and constructor without side effects, so problem of double calls can be fixed (unlike issue #8) --- src/button.cpp | 2 -- src/button.h | 2 +- src/check.cpp | 1 - src/check.h | 2 +- src/color.cpp | 2 -- src/color.h | 2 +- src/compass.cpp | 2 -- src/compass.h | 2 +- 8 files changed, 4 insertions(+), 11 deletions(-) (limited to 'src') diff --git a/src/button.cpp b/src/button.cpp index f25663c..27fea9b 100644 --- a/src/button.cpp +++ b/src/button.cpp @@ -42,8 +42,6 @@ CButton::CButton(CInstanceManager* iMan) : CControl(iMan) { - CControl::CControl(iMan); - m_bCapture = FALSE; m_bImmediat = FALSE; m_bRepeat = FALSE; diff --git a/src/button.h b/src/button.h index 1b50682..2d30eea 100644 --- a/src/button.h +++ b/src/button.h @@ -31,7 +31,7 @@ class CButton : public CControl { public: CButton(CInstanceManager* iMan); - ~CButton(); + virtual ~CButton(); BOOL Create(FPOINT pos, FPOINT dim, int icon, EventMsg eventMsg); diff --git a/src/check.cpp b/src/check.cpp index baaf15d..f485921 100644 --- a/src/check.cpp +++ b/src/check.cpp @@ -38,7 +38,6 @@ CCheck::CCheck(CInstanceManager* iMan) : CControl(iMan) { - CControl::CControl(iMan); } // Object's destructor. diff --git a/src/check.h b/src/check.h index 33d1c79..118b6cb 100644 --- a/src/check.h +++ b/src/check.h @@ -31,7 +31,7 @@ class CCheck : public CControl { public: CCheck(CInstanceManager* iMan); - ~CCheck(); + virtual ~CCheck(); BOOL Create(FPOINT pos, FPOINT dim, int icon, EventMsg eventMsg); diff --git a/src/color.cpp b/src/color.cpp index d088aa1..cf69b0d 100644 --- a/src/color.cpp +++ b/src/color.cpp @@ -42,8 +42,6 @@ CColor::CColor(CInstanceManager* iMan) : CControl(iMan) { - CControl::CControl(iMan); - m_bRepeat = FALSE; m_repeat = 0.0f; diff --git a/src/color.h b/src/color.h index 31176fe..fec01c4 100644 --- a/src/color.h +++ b/src/color.h @@ -32,7 +32,7 @@ class CColor : public CControl { public: CColor(CInstanceManager* iMan); - ~CColor(); + virtual ~CColor(); BOOL Create(FPOINT pos, FPOINT dim, int icon, EventMsg eventMsg); diff --git a/src/compass.cpp b/src/compass.cpp index 0ec718c..92804c2 100644 --- a/src/compass.cpp +++ b/src/compass.cpp @@ -36,8 +36,6 @@ CCompass::CCompass(CInstanceManager* iMan) : CControl(iMan) { - CControl::CControl(iMan); - m_dir = 0.0f; } diff --git a/src/compass.h b/src/compass.h index 20f11c2..1eed3d6 100644 --- a/src/compass.h +++ b/src/compass.h @@ -31,7 +31,7 @@ class CCompass : public CControl { public: CCompass(CInstanceManager* iMan); - ~CCompass(); + virtual ~CCompass(); BOOL Create(FPOINT pos, FPOINT dim, int icon, EventMsg eventMsg); -- cgit v1.2.3-1-g7c22