Browse Source

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.
pull/278/head
Vladimír Vondruš 13 years ago
parent
commit
0f2a1661d9
  1. 4
      src/SceneGraph/AbstractTransformation.h
  2. 3
      src/SceneGraph/AbstractTranslationRotation2D.h
  3. 3
      src/SceneGraph/AbstractTranslationRotation3D.h
  4. 3
      src/SceneGraph/AbstractTranslationRotationScaling2D.h
  5. 3
      src/SceneGraph/AbstractTranslationRotationScaling3D.h
  6. 1
      src/SceneGraph/Object.hpp

4
src/SceneGraph/AbstractTransformation.h

@ -62,7 +62,6 @@ template<UnsignedInt dimensions, class T> class MAGNUM_SCENEGRAPH_EXPORT Abstrac
static const UnsignedInt Dimensions = dimensions; static const UnsignedInt Dimensions = dimensions;
explicit AbstractBasicTransformation(); explicit AbstractBasicTransformation();
virtual ~AbstractBasicTransformation() = 0;
#ifdef DOXYGEN_GENERATING_OUTPUT #ifdef DOXYGEN_GENERATING_OUTPUT
/** /**
@ -143,6 +142,9 @@ template<UnsignedInt dimensions, class T> class MAGNUM_SCENEGRAPH_EXPORT Abstrac
return this; return this;
} }
protected:
~AbstractBasicTransformation() = default;
#ifdef DOXYGEN_GENERATING_OUTPUT #ifdef DOXYGEN_GENERATING_OUTPUT
protected: protected:
#else #else

3
src/SceneGraph/AbstractTranslationRotation2D.h

@ -73,6 +73,9 @@ template<class T> class AbstractBasicTranslationRotation2D: public AbstractBasic
} }
#endif #endif
protected:
~AbstractBasicTranslationRotation2D() = default;
#ifdef DOXYGEN_GENERATING_OUTPUT #ifdef DOXYGEN_GENERATING_OUTPUT
protected: protected:
#else #else

3
src/SceneGraph/AbstractTranslationRotation3D.h

@ -120,6 +120,9 @@ template<class T> class AbstractBasicTranslationRotation3D: public AbstractBasic
} }
#endif #endif
protected:
~AbstractBasicTranslationRotation3D() = default;
#ifdef DOXYGEN_GENERATING_OUTPUT #ifdef DOXYGEN_GENERATING_OUTPUT
protected: protected:
#else #else

3
src/SceneGraph/AbstractTranslationRotationScaling2D.h

@ -70,6 +70,9 @@ template<class T> class AbstractBasicTranslationRotationScaling2D: public Abstra
} }
#endif #endif
protected:
~AbstractBasicTranslationRotationScaling2D() = default;
#ifdef DOXYGEN_GENERATING_OUTPUT #ifdef DOXYGEN_GENERATING_OUTPUT
protected: protected:
#else #else

3
src/SceneGraph/AbstractTranslationRotationScaling3D.h

@ -82,6 +82,9 @@ template<class T> class AbstractBasicTranslationRotationScaling3D: public Abstra
} }
#endif #endif
protected:
~AbstractBasicTranslationRotationScaling3D() = default;
#ifdef DOXYGEN_GENERATING_OUTPUT #ifdef DOXYGEN_GENERATING_OUTPUT
protected: protected:
#else #else

1
src/SceneGraph/Object.hpp

@ -42,7 +42,6 @@ template<UnsignedInt dimensions, class T> AbstractBasicObject<dimensions, T>::Ab
template<UnsignedInt dimensions, class T> AbstractBasicObject<dimensions, T>::~AbstractBasicObject() {} template<UnsignedInt dimensions, class T> AbstractBasicObject<dimensions, T>::~AbstractBasicObject() {}
template<UnsignedInt dimensions, class T> AbstractBasicTransformation<dimensions, T>::AbstractBasicTransformation() {} template<UnsignedInt dimensions, class T> AbstractBasicTransformation<dimensions, T>::AbstractBasicTransformation() {}
template<UnsignedInt dimensions, class T> AbstractBasicTransformation<dimensions, T>::~AbstractBasicTransformation() {}
template<class Transformation> Object<Transformation>::~Object() = default; template<class Transformation> Object<Transformation>::~Object() = default;

Loading…
Cancel
Save