From b851b8f23b1527e35b78bf68e7eecffa3c59589b Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Tue, 7 Sep 2021 02:10:36 +0100 Subject: Add missing virtual destructors --- Jamroot.jam | 1 + slicer/slicer/modelParts.h | 3 +++ slicer/slicer/modelPartsTypes.h | 2 ++ slicer/slicer/modelPartsTypes.impl.h | 1 + 4 files changed, 7 insertions(+) diff --git a/Jamroot.jam b/Jamroot.jam index 7910d73..5403aed 100644 --- a/Jamroot.jam +++ b/Jamroot.jam @@ -17,6 +17,7 @@ project release:on debug:extra debug:on + debug:-Wnon-virtual-dtor coverage:on tidy:boost-* tidy:bugprone-* diff --git a/slicer/slicer/modelParts.h b/slicer/slicer/modelParts.h index b0de888..dd496ec 100644 --- a/slicer/slicer/modelParts.h +++ b/slicer/slicer/modelParts.h @@ -17,6 +17,7 @@ namespace Ice { namespace Slicer { template class TValueTarget { public: + virtual ~TValueTarget() = default; virtual void get(const T &) const = 0; }; class ValueTarget : @@ -41,6 +42,7 @@ namespace Slicer { template class TValueSource { public: + virtual ~TValueSource() = default; virtual void set(T &) const = 0; }; class ValueSource : @@ -111,6 +113,7 @@ namespace Slicer { name(n), nameLower(nl), nameStr(ns) { } + virtual ~HookCommon() = default; [[nodiscard]] bool filter(const HookFilter & flt) const; void apply(const ChildHandler & ch, const ModelPartPtr & modelPart) const; diff --git a/slicer/slicer/modelPartsTypes.h b/slicer/slicer/modelPartsTypes.h index 2d959ea..2bbc9c9 100644 --- a/slicer/slicer/modelPartsTypes.h +++ b/slicer/slicer/modelPartsTypes.h @@ -313,6 +313,8 @@ namespace Slicer { using Consumer = std::function; using element_type = T; + virtual ~Stream() = default; + virtual void Produce(const Consumer & c) = 0; }; diff --git a/slicer/slicer/modelPartsTypes.impl.h b/slicer/slicer/modelPartsTypes.impl.h index ba30abe..4d5f991 100644 --- a/slicer/slicer/modelPartsTypes.impl.h +++ b/slicer/slicer/modelPartsTypes.impl.h @@ -385,6 +385,7 @@ namespace Slicer { { static_assert(sizeof...(MD) == N, "Wrong amount of metadata"); } + ~Hook() = default; [[nodiscard]] const Metadata & GetMetadata() const override -- cgit v1.2.3