diff --git a/source/collada/CommonConvert.h b/source/collada/CommonConvert.h index 5d636c874a..c858f93574 100644 --- a/source/collada/CommonConvert.h +++ b/source/collada/CommonConvert.h @@ -43,6 +43,7 @@ private: struct OutputCB { + virtual ~OutputCB() { } virtual void operator() (const char* data, unsigned int length)=0; }; diff --git a/source/lib/frequency_filter.h b/source/lib/frequency_filter.h index ad80a8f19e..facadeb48c 100644 --- a/source/lib/frequency_filter.h +++ b/source/lib/frequency_filter.h @@ -26,6 +26,8 @@ // calculate frequency of events (tuned for 100 Hz) struct IFrequencyFilter { + virtual ~IFrequencyFilter() {} + virtual void Update(double value) = 0; // smoothed but rapidly tracked frequency diff --git a/source/network/Network.h b/source/network/Network.h index 7175dd9749..992534e230 100644 --- a/source/network/Network.h +++ b/source/network/Network.h @@ -95,6 +95,8 @@ class CMessageSocket; class IMessagePipeEnd { public: + virtual ~IMessagePipeEnd() {} + /** * Push a message on the output queue. It will be freed when popped of the * queue, not by the caller. The pointer must point to memory that can be diff --git a/source/network/Serialization.h b/source/network/Serialization.h index c5af5f505c..7fe1f836c4 100644 --- a/source/network/Serialization.h +++ b/source/network/Serialization.h @@ -75,6 +75,8 @@ class ISerializable { public: + virtual ~ISerializable() {} + /** * Return the length of the serialized form of this object */ diff --git a/source/network/fsm.h b/source/network/fsm.h index dd0487b9a8..3162c5a13d 100644 --- a/source/network/fsm.h +++ b/source/network/fsm.h @@ -147,7 +147,7 @@ class CFsm public: CFsm( void ); - ~CFsm( void ); + virtual ~CFsm( void ); /** * Constructs the state machine. This method must be overriden so that diff --git a/source/renderer/Scene.h b/source/renderer/Scene.h index 7804ed8bbb..eaa1ca5dc7 100644 --- a/source/renderer/Scene.h +++ b/source/renderer/Scene.h @@ -40,8 +40,11 @@ class SceneCollector; * * @see CRenderer::RenderScene */ -class Scene { +class Scene +{ public: + virtual ~Scene() {} + /** * Send all objects that can be seen when rendering the given frustum * to the scene collector. @@ -58,8 +61,11 @@ public: * * @see Scene::EnumerateObjects */ -class SceneCollector { +class SceneCollector +{ public: + virtual ~SceneCollector() {} + /** * Submit a terrain patch that is part of the scene. */ diff --git a/source/scripting/ScriptableObject.h b/source/scripting/ScriptableObject.h index 4216fecf96..a9f8fbb9aa 100644 --- a/source/scripting/ScriptableObject.h +++ b/source/scripting/ScriptableObject.h @@ -60,6 +60,7 @@ public: virtual void AddProperty( const CStrW& PropertyName, const CStrW& Value ) = 0; inline IJSObject() {} + virtual ~IJSObject() {} }; template class CJSObject; diff --git a/source/simulation/AStarEngine.h b/source/simulation/AStarEngine.h index f099f4104c..66d2918222 100644 --- a/source/simulation/AStarEngine.h +++ b/source/simulation/AStarEngine.h @@ -163,6 +163,7 @@ class AStarGoalBase { public: AStarGoalBase() {} + virtual ~AStarGoalBase() {} virtual void SetDestination( const CVector2D& ) = 0; virtual void SetRadius( float r ) = 0; virtual float DistanceToGoal( const CVector2D& ) = 0; diff --git a/source/simulation/BoundingObjects.h b/source/simulation/BoundingObjects.h index aa22753b23..b7c3565dbe 100644 --- a/source/simulation/BoundingObjects.h +++ b/source/simulation/BoundingObjects.h @@ -33,6 +33,7 @@ class CBoundingObject { public: CBoundingObject() {} + virtual ~CBoundingObject() {} enum EBoundingType { BOUND_NONE, diff --git a/source/tools/atlas/AtlasUI/General/IAtlasSerialiser.h b/source/tools/atlas/AtlasUI/General/IAtlasSerialiser.h index 7635a045b3..a47dc8c4d6 100644 --- a/source/tools/atlas/AtlasUI/General/IAtlasSerialiser.h +++ b/source/tools/atlas/AtlasUI/General/IAtlasSerialiser.h @@ -26,6 +26,8 @@ class IAtlasSerialiser { public: + virtual ~IAtlasSerialiser() { } + // Freeze/Thaw are mainly used by the 'undo' system, to take a snapshot // of the a GUI component's state, and to revert to that snapshot. // obj.Thaw(obj.Freeze()) should leave the component's contents unchanged. diff --git a/source/tools/atlas/AtlasUI/ScenarioEditor/Tools/Common/Tools.h b/source/tools/atlas/AtlasUI/ScenarioEditor/Tools/Common/Tools.h index ee1b09b89b..e9c1ca9a30 100644 --- a/source/tools/atlas/AtlasUI/ScenarioEditor/Tools/Common/Tools.h +++ b/source/tools/atlas/AtlasUI/ScenarioEditor/Tools/Common/Tools.h @@ -111,6 +111,7 @@ protected: struct State { + virtual ~State() {} virtual void OnEnter(T* WXUNUSED(obj)) {} virtual void OnLeave(T* WXUNUSED(obj)) {} virtual void OnTick (T* WXUNUSED(obj), float WXUNUSED(dt)) {} diff --git a/source/tools/atlas/DatafileIO/Stream/Stream.h b/source/tools/atlas/DatafileIO/Stream/Stream.h index e130803601..fcc17ed5cf 100644 --- a/source/tools/atlas/DatafileIO/Stream/Stream.h +++ b/source/tools/atlas/DatafileIO/Stream/Stream.h @@ -38,7 +38,7 @@ namespace DatafileIO public: enum whence { FROM_START, FROM_END, FROM_CURRENT }; - virtual ~Stream() {}; + virtual ~Stream() {} virtual off_t Tell() const = 0; virtual bool IsOk() const = 0; }; @@ -46,6 +46,7 @@ namespace DatafileIO class SeekableStream { public: + virtual ~SeekableStream() {} virtual void Seek(off_t pos, Stream::whence mode) = 0; }; diff --git a/source/tools/atlas/GameInterface/MessagePasser.h b/source/tools/atlas/GameInterface/MessagePasser.h index fe91e0f64c..8b63c018e0 100644 --- a/source/tools/atlas/GameInterface/MessagePasser.h +++ b/source/tools/atlas/GameInterface/MessagePasser.h @@ -29,12 +29,14 @@ struct QueryMessage; class MessagePasser { public: - virtual void Add(IMessage*)=0; + virtual ~MessagePasser() {} + + virtual void Add(IMessage*) = 0; // takes ownership of IMessage object - virtual IMessage* Retrieve()=0; + virtual IMessage* Retrieve() = 0; - virtual void Query(QueryMessage*, void(*timeoutCallback)())=0; + virtual void Query(QueryMessage*, void(*timeoutCallback)()) = 0; // blocks; caller retains ownership of QueryMessage object };