2
0
Эх сурвалжийг харах

Fix: Added missing virtual destructors for classes with virtual functions.

bank 11 жил өмнө
parent
commit
e7fb6a54de

+ 1 - 0
Engine/source/T3D/fx/cameraFXMgr.h

@@ -45,6 +45,7 @@ protected:
 
 
 public:
 public:
    CameraFX();
    CameraFX();
+   virtual ~CameraFX() { }
 
 
    MatrixF &   getTrans(){ return mCamFXTrans; }
    MatrixF &   getTrans(){ return mCamFXTrans; }
    virtual bool isExpired(){ return mElapsedTime >= mDuration; }
    virtual bool isExpired(){ return mElapsedTime >= mDuration; }

+ 1 - 0
Engine/source/core/threadStatic.h

@@ -47,6 +47,7 @@ public:
     :  mHitCount( 0 ) 
     :  mHitCount( 0 ) 
 #endif
 #endif
    { };
    { };
+   virtual ~_TorqueThreadStatic() { }
 
 
    static const U32 getListIndex(){ return mListIndex; }
    static const U32 getListIndex(){ return mListIndex; }
 
 

+ 1 - 0
Engine/source/gfx/screenshot.h

@@ -74,6 +74,7 @@ public:
   
   
    /// Constructor.
    /// Constructor.
    ScreenShot();
    ScreenShot();
+   virtual ~ScreenShot() { }
 
 
    /// Used to start the screenshot capture.
    /// Used to start the screenshot capture.
    void setPending( const char *filename, bool writeJPG, S32 tiles, F32 overlap );
    void setPending( const char *filename, bool writeJPG, S32 tiles, F32 overlap );

+ 2 - 0
Engine/source/gfx/video/videoCapture.h

@@ -221,6 +221,8 @@ protected:
    // List with bitmaps which are done encoding
    // List with bitmaps which are done encoding
    ThreadSafeDeque< GBitmap* > mProcessedBitmaps;
    ThreadSafeDeque< GBitmap* > mProcessedBitmaps;
 public:
 public:
+   virtual ~VideoEncoder() { }
+
    // Stores an encoded bitmap to be dealt with later
    // Stores an encoded bitmap to be dealt with later
    void pushProcessedBitmap( GBitmap* bitmap );
    void pushProcessedBitmap( GBitmap* bitmap );
       
       

+ 2 - 0
Engine/source/shaderGen/shaderFeature.h

@@ -48,6 +48,8 @@ class ShaderFeatureConstHandles
 {
 {
 public:
 public:
 
 
+   virtual ~ShaderFeatureConstHandles() { }
+
    virtual void init( GFXShader *shader ) = 0;
    virtual void init( GFXShader *shader ) = 0;
 
 
    virtual void setConsts( SceneRenderState *state, 
    virtual void setConsts( SceneRenderState *state, 

+ 2 - 0
Engine/source/ts/collada/colladaUtils.h

@@ -430,6 +430,8 @@ public:
 class BasePrimitive
 class BasePrimitive
 {
 {
 public:
 public:
+   virtual ~BasePrimitive() { }
+
    /// Return true if the element is a geometric primitive type
    /// Return true if the element is a geometric primitive type
    static bool isPrimitive(const daeElement* element)
    static bool isPrimitive(const daeElement* element)
    {
    {