From 808febfecc006d9c52fb85b909160f9d264e507e Mon Sep 17 00:00:00 2001 From: Sebastian Eibl <sebastian.eibl@fau.de> Date: Tue, 5 Jun 2018 09:39:18 +0200 Subject: [PATCH] [BUGFIX] added missing virtual dtor to base class --- src/field/allocation/FieldAllocator.h | 2 ++ src/geometry/bodies/DynamicBody.h | 1 + src/mesh/vtk/VTKMeshWriter.h | 3 +++ 3 files changed, 6 insertions(+) diff --git a/src/field/allocation/FieldAllocator.h b/src/field/allocation/FieldAllocator.h index 5be0ecf4b..4ab58c0fe 100644 --- a/src/field/allocation/FieldAllocator.h +++ b/src/field/allocation/FieldAllocator.h @@ -48,6 +48,8 @@ namespace field { { public: + virtual ~FieldAllocator() = default; + /** * \brief Allocate memory for a field of given sizes and initializes reference counter with one * diff --git a/src/geometry/bodies/DynamicBody.h b/src/geometry/bodies/DynamicBody.h index dd666f106..a3c6ccca5 100644 --- a/src/geometry/bodies/DynamicBody.h +++ b/src/geometry/bodies/DynamicBody.h @@ -30,6 +30,7 @@ namespace geometry { class AbstractBody { public: + virtual ~AbstractBody() = default; virtual bool contains (const Vector3<real_t> & point ) const = 0; virtual FastOverlapResult fastOverlapCheck ( const Vector3<real_t> & cellMidpoint, real_t dx ) const = 0; virtual FastOverlapResult fastOverlapCheck ( const AABB & box ) const = 0; diff --git a/src/mesh/vtk/VTKMeshWriter.h b/src/mesh/vtk/VTKMeshWriter.h index cf01acf7e..129c456a1 100644 --- a/src/mesh/vtk/VTKMeshWriter.h +++ b/src/mesh/vtk/VTKMeshWriter.h @@ -52,6 +52,7 @@ public: { public: DataSource( const std::string & _name ) : name_( _name ) { } + virtual ~DataSource() = default; typedef T value_type; virtual uint_t numComponents() = 0; const std::string & name() { return name_; } @@ -67,6 +68,7 @@ public: typedef typename VTKMeshWriter::Vertices Vertices; VertexDataSource( const std::string & _name ) : DataSource<T>( _name ) { } + virtual ~VertexDataSource() = default; virtual void getData( const MeshType &, const Vertices & vertices, std::vector<T> & ) = 0; }; @@ -78,6 +80,7 @@ public: typedef typename VTKMeshWriter::Faces Faces; FaceDataSource( const std::string & _name ) : DataSource<T>( _name ) { } + virtual ~FaceDataSource() = default; virtual void getData( const MeshType &, const Faces & faces, std::vector<T> & ) = 0; }; -- GitLab