From: TimePath Date: Sun, 6 Aug 2017 12:03:00 +0000 (+1000) Subject: Remove -Wno-delete-non-virtual-dtor X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=34ec2a7ed336d403fc8d7d0951b5dd3af26224bb;p=xonotic%2Fnetradiant.git Remove -Wno-delete-non-virtual-dtor --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 49029f36..65b7e26a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -99,8 +99,6 @@ addflags_c("-Wno-int-conversion") addflags_c("-Wno-pointer-to-int-cast") addflags_c("-Wno-incompatible-pointer-types") -addflags_cxx("-Wno-delete-non-virtual-dtor") - set(CMAKE_POSITION_INDEPENDENT_CODE 1) set(GTK_TARGET 2 CACHE STRING "GTK target") add_definitions(-DGTK_TARGET=${GTK_TARGET}) diff --git a/include/iarchive.h b/include/iarchive.h index dddf5579..b6cfda19 100644 --- a/include/iarchive.h +++ b/include/iarchive.h @@ -31,6 +31,7 @@ class InputStream; class ArchiveFile { public: +virtual ~ArchiveFile() = default; /// \brief Destroys the file object. virtual void release() = 0; /// \brief Returns the size of the file data in bytes. @@ -50,6 +51,7 @@ class TextInputStream; class ArchiveTextFile { public: +virtual ~ArchiveTextFile() = default; /// \brief Destroys the file object. virtual void release() = 0; /// \brief Returns the stream associated with this file. @@ -75,6 +77,7 @@ class CustomArchiveVisitor; class Archive { public: +virtual ~Archive() = default; class Visitor { diff --git a/include/ientity.h b/include/ientity.h index c315b3ab..db47ff49 100644 --- a/include/ientity.h +++ b/include/ientity.h @@ -34,6 +34,7 @@ typedef Callback1 KeyObserver; class EntityKeyValue { public: +virtual ~EntityKeyValue() = default; virtual const char* c_str() const = 0; virtual void assign( const char* other ) = 0; virtual void attach( const KeyObserver& observer ) = 0; diff --git a/include/iimage.h b/include/iimage.h index c159e657..7f355f2c 100644 --- a/include/iimage.h +++ b/include/iimage.h @@ -29,6 +29,7 @@ typedef unsigned char byte; class Image { public: +virtual ~Image() = default; virtual void release() = 0; virtual byte* getRGBAPixels() const = 0; virtual unsigned int getWidth() const = 0; diff --git a/include/imap.h b/include/imap.h index 7af4c472..396627d0 100644 --- a/include/imap.h +++ b/include/imap.h @@ -59,6 +59,7 @@ typedef void ( *GraphTraversalFunc )( scene::Node& root, const scene::Traversabl class MapFormat { public: +virtual ~MapFormat() = default; INTEGER_CONSTANT( Version, 2 ); STRING_CONSTANT( Name, "map" ); mutable bool wrongFormat; diff --git a/include/irender.h b/include/irender.h index 51994542..8b0c3ec6 100644 --- a/include/irender.h +++ b/include/irender.h @@ -107,6 +107,7 @@ const int c_attr_Binormal = 4; class OpenGLRenderable { public: +virtual ~OpenGLRenderable() = default; virtual void render( RenderStateFlags state ) const = 0; }; @@ -119,6 +120,7 @@ class ModuleObserver; class Shader { public: +virtual ~Shader() = default; virtual void addRenderable( const OpenGLRenderable& renderable, const Matrix4& modelview, const LightList* lights = 0 ) = 0; virtual void incrementUsed() = 0; virtual void decrementUsed() = 0; diff --git a/include/iscenegraph.h b/include/iscenegraph.h index 6b28b0fc..569cf864 100644 --- a/include/iscenegraph.h +++ b/include/iscenegraph.h @@ -70,6 +70,7 @@ typedef Stack Path; class Graph { public: +virtual ~Graph() = default; INTEGER_CONSTANT( Version, 1 ); STRING_CONSTANT( Name, "scenegraph" ); diff --git a/include/iscriplib.h b/include/iscriplib.h index 8f645033..e070406f 100644 --- a/include/iscriplib.h +++ b/include/iscriplib.h @@ -33,6 +33,7 @@ class Tokeniser { public: +virtual ~Tokeniser() = default; virtual void release() = 0; virtual void nextLine() = 0; virtual const char* getToken() = 0; @@ -46,6 +47,7 @@ class TextInputStream; class TokenWriter { public: +virtual ~TokenWriter() = default; virtual void release() = 0; virtual void nextLine() = 0; virtual void writeToken( const char* token ) = 0; diff --git a/include/iselection.h b/include/iselection.h index ba000021..a5951f9a 100644 --- a/include/iselection.h +++ b/include/iselection.h @@ -63,6 +63,7 @@ typedef SignalHandler1 SelectionChangeHandler; class SelectionSystem { public: +virtual ~SelectionSystem() = default; INTEGER_CONSTANT( Version, 1 ); STRING_CONSTANT( Name, "selection" ); diff --git a/include/itextures.h b/include/itextures.h index cc91399d..6fa4b02c 100644 --- a/include/itextures.h +++ b/include/itextures.h @@ -59,6 +59,7 @@ virtual void realise() = 0; class TexturesCache { public: +virtual ~TexturesCache() = default; INTEGER_CONSTANT( Version, 1 ); STRING_CONSTANT( Name, "textures" ); virtual LoadImageCallback defaultLoader() const = 0; diff --git a/include/modelskin.h b/include/modelskin.h index bb5922ee..a2c219e6 100644 --- a/include/modelskin.h +++ b/include/modelskin.h @@ -40,6 +40,7 @@ class ModuleObserver; class ModelSkin { public: +virtual ~ModelSkin() = default; STRING_CONSTANT( Name, "ModelSkin" ); /// \brief Attach an \p observer whose realise() and unrealise() methods will be called when the skin is loaded or unloaded. virtual void attach( ModuleObserver& observer ) = 0; @@ -64,6 +65,7 @@ virtual void skinChanged() = 0; class ModelSkinCache { public: +virtual ~ModelSkinCache() = default; INTEGER_CONSTANT( Version, 1 ); STRING_CONSTANT( Name, "modelskin" ); /// \brief Increments the reference count of and returns a reference to the skin uniquely identified by 'name'. diff --git a/include/moduleobserver.h b/include/moduleobserver.h index 496d6f2e..0559b850 100644 --- a/include/moduleobserver.h +++ b/include/moduleobserver.h @@ -25,6 +25,7 @@ class ModuleObserver { public: +virtual ~ModuleObserver() = default; virtual void unrealise() = 0; virtual void realise() = 0; }; diff --git a/include/renderable.h b/include/renderable.h index 0c0e770b..d50ca7a8 100644 --- a/include/renderable.h +++ b/include/renderable.h @@ -60,6 +60,7 @@ class VolumeTest; class Renderable { public: +virtual ~Renderable() = default; STRING_CONSTANT( Name, "Renderable" ); virtual void renderSolid( Renderer& renderer, const VolumeTest& volume ) const = 0; diff --git a/include/windowobserver.h b/include/windowobserver.h index b72d0820..24948634 100644 --- a/include/windowobserver.h +++ b/include/windowobserver.h @@ -79,6 +79,7 @@ typedef Vector2 WindowVector; class WindowObserver { public: +virtual ~WindowObserver() = default; virtual void release() = 0; virtual void onSizeChanged( int width, int height ) = 0; virtual void onMouseDown( const WindowVector& position, ButtonIdentifier button, ModifierFlags modifiers ) = 0; diff --git a/plugins/image/ktx.cpp b/plugins/image/ktx.cpp index 582d0b8b..480ca9e8 100644 --- a/plugins/image/ktx.cpp +++ b/plugins/image/ktx.cpp @@ -47,6 +47,7 @@ class KTX_Decoder { public: + virtual ~KTX_Decoder() = default; virtual void Decode( PointerInputStream& istream, byte* out ) = 0; virtual unsigned int GetPixelSize() = 0; }; diff --git a/radiant/build.cpp b/radiant/build.cpp index 6820981b..b5a57f5e 100644 --- a/radiant/build.cpp +++ b/radiant/build.cpp @@ -56,6 +56,7 @@ const char* build_get_variable( const char* name ){ class Evaluatable { public: +virtual ~Evaluatable() = default; virtual void evaluate( StringBuffer& output ) = 0; virtual void exportXML( XMLImporter& importer ) = 0; }; @@ -172,6 +173,7 @@ void exportXML( XMLImporter& importer ){ class XMLElementParser : public TextOutputStream { public: +virtual ~XMLElementParser() = default; virtual XMLElementParser& pushElement( const XMLElement& element ) = 0; virtual void popElement( const char* name ) = 0; }; diff --git a/radiant/dialog.h b/radiant/dialog.h index f4ce1667..cf1c4858 100644 --- a/radiant/dialog.h +++ b/radiant/dialog.h @@ -88,6 +88,7 @@ typedef ReferenceCaller1