From: Rudolf Polzer Date: Thu, 13 Feb 2014 16:13:24 +0000 (+0100) Subject: Some clang fixes. Not all yet. X-Git-Tag: xonotic-v0.8.0~2 X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fnetradiant.git;a=commitdiff_plain;h=e3251259ad5851c6c8114427eee4a38089442994 Some clang fixes. Not all yet. --- diff --git a/include/iundo.h b/include/iundo.h index 58f72d4b..eb1e8681 100644 --- a/include/iundo.h +++ b/include/iundo.h @@ -33,6 +33,8 @@ class UndoMemento { public: virtual void release() = 0; +virtual ~UndoMemento() { +} }; class Undoable @@ -40,12 +42,16 @@ class Undoable public: virtual UndoMemento* exportState() const = 0; virtual void importState( const UndoMemento* state ) = 0; +virtual ~Undoable() { +} }; class UndoObserver { public: virtual void save( Undoable* undoable ) = 0; +virtual ~UndoObserver() { +} }; class UndoTracker @@ -55,6 +61,8 @@ virtual void clear() = 0; virtual void begin() = 0; virtual void undo() = 0; virtual void redo() = 0; +virtual ~UndoTracker() { +} }; class UndoSystem @@ -75,6 +83,9 @@ virtual void clear() = 0; virtual void trackerAttach( UndoTracker& tracker ) = 0; virtual void trackerDetach( UndoTracker& tracker ) = 0; + +virtual ~UndoSystem() { +} }; #include "modulesystem.h" diff --git a/libs/scenelib.h b/libs/scenelib.h index 2b4b6007..29402065 100644 --- a/libs/scenelib.h +++ b/libs/scenelib.h @@ -166,6 +166,8 @@ class Symbiot { public: virtual void release() = 0; +virtual ~Symbiot(){ +} }; private: @@ -223,8 +225,18 @@ bool visible(){ bool excluded(){ return ( m_state & eExcluded ) != 0; } +bool operator<( const scene::Node& other ){ + return this < &other; +} +bool operator==( const scene::Node& other ){ + return this == &other; +} +bool operator!=( const scene::Node& other ){ + return this != &other; +} }; + class NullNode : public Node::Symbiot { NodeTypeCastTable m_casts; @@ -276,16 +288,6 @@ inline TransformNode* Node_getTransformNode( scene::Node& node ){ return NodeTypeCast::cast( node ); } -inline bool operator<( scene::Node& node, scene::Node& other ){ - return &node < &other; -} -inline bool operator==( scene::Node& node, scene::Node& other ){ - return &node == &other; -} -inline bool operator!=( scene::Node& node, scene::Node& other ){ - return !::operator==( node, other ); -} - inline scene::Node& NewNullNode(){ return ( new scene::NullNode )->node();