From 0f2a1661d9e6d8c2c189275ecf3a6744bbd7f784 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sat, 6 Jul 2013 11:35:46 +0200 Subject: [PATCH] SceneGraph: use protected destructor rather than pure virtual one. The Transformation classes are always instantiated by inheritance, thus we don't need any virtual deletion capabilities. --- src/SceneGraph/AbstractTransformation.h | 4 +++- src/SceneGraph/AbstractTranslationRotation2D.h | 3 +++ src/SceneGraph/AbstractTranslationRotation3D.h | 3 +++ src/SceneGraph/AbstractTranslationRotationScaling2D.h | 3 +++ src/SceneGraph/AbstractTranslationRotationScaling3D.h | 3 +++ src/SceneGraph/Object.hpp | 1 - 6 files changed, 15 insertions(+), 2 deletions(-) diff --git a/src/SceneGraph/AbstractTransformation.h b/src/SceneGraph/AbstractTransformation.h index 95dfbbeff..f429a021e 100644 --- a/src/SceneGraph/AbstractTransformation.h +++ b/src/SceneGraph/AbstractTransformation.h @@ -62,7 +62,6 @@ template class MAGNUM_SCENEGRAPH_EXPORT Abstrac static const UnsignedInt Dimensions = dimensions; explicit AbstractBasicTransformation(); - virtual ~AbstractBasicTransformation() = 0; #ifdef DOXYGEN_GENERATING_OUTPUT /** @@ -143,6 +142,9 @@ template class MAGNUM_SCENEGRAPH_EXPORT Abstrac return this; } + protected: + ~AbstractBasicTransformation() = default; + #ifdef DOXYGEN_GENERATING_OUTPUT protected: #else diff --git a/src/SceneGraph/AbstractTranslationRotation2D.h b/src/SceneGraph/AbstractTranslationRotation2D.h index 995cb6c60..661400784 100644 --- a/src/SceneGraph/AbstractTranslationRotation2D.h +++ b/src/SceneGraph/AbstractTranslationRotation2D.h @@ -73,6 +73,9 @@ template class AbstractBasicTranslationRotation2D: public AbstractBasic } #endif + protected: + ~AbstractBasicTranslationRotation2D() = default; + #ifdef DOXYGEN_GENERATING_OUTPUT protected: #else diff --git a/src/SceneGraph/AbstractTranslationRotation3D.h b/src/SceneGraph/AbstractTranslationRotation3D.h index d26e34cbc..604e3cc66 100644 --- a/src/SceneGraph/AbstractTranslationRotation3D.h +++ b/src/SceneGraph/AbstractTranslationRotation3D.h @@ -120,6 +120,9 @@ template class AbstractBasicTranslationRotation3D: public AbstractBasic } #endif + protected: + ~AbstractBasicTranslationRotation3D() = default; + #ifdef DOXYGEN_GENERATING_OUTPUT protected: #else diff --git a/src/SceneGraph/AbstractTranslationRotationScaling2D.h b/src/SceneGraph/AbstractTranslationRotationScaling2D.h index 5be4b55ec..407ffc365 100644 --- a/src/SceneGraph/AbstractTranslationRotationScaling2D.h +++ b/src/SceneGraph/AbstractTranslationRotationScaling2D.h @@ -70,6 +70,9 @@ template class AbstractBasicTranslationRotationScaling2D: public Abstra } #endif + protected: + ~AbstractBasicTranslationRotationScaling2D() = default; + #ifdef DOXYGEN_GENERATING_OUTPUT protected: #else diff --git a/src/SceneGraph/AbstractTranslationRotationScaling3D.h b/src/SceneGraph/AbstractTranslationRotationScaling3D.h index c9164190f..63719fa38 100644 --- a/src/SceneGraph/AbstractTranslationRotationScaling3D.h +++ b/src/SceneGraph/AbstractTranslationRotationScaling3D.h @@ -82,6 +82,9 @@ template class AbstractBasicTranslationRotationScaling3D: public Abstra } #endif + protected: + ~AbstractBasicTranslationRotationScaling3D() = default; + #ifdef DOXYGEN_GENERATING_OUTPUT protected: #else diff --git a/src/SceneGraph/Object.hpp b/src/SceneGraph/Object.hpp index fc30805bc..1dd120ce5 100644 --- a/src/SceneGraph/Object.hpp +++ b/src/SceneGraph/Object.hpp @@ -42,7 +42,6 @@ template AbstractBasicObject::Ab template AbstractBasicObject::~AbstractBasicObject() {} template AbstractBasicTransformation::AbstractBasicTransformation() {} -template AbstractBasicTransformation::~AbstractBasicTransformation() {} template Object::~Object() = default;