From baaf4f6db0be20d7998988a075738fd5abce7174 Mon Sep 17 00:00:00 2001 From: surtur Date: Thu, 3 Feb 2022 01:11:39 +0100 Subject: [PATCH] fix: -Wnon-virtual-dtor --- entropy_src.h | 4 +++- event_adder.h | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/entropy_src.h b/entropy_src.h index c2ba4b7..8e7cbde 100644 --- a/entropy_src.h +++ b/entropy_src.h @@ -20,7 +20,9 @@ public: EntropySrc() = default; EntropySrc(const EntropySrc&) = delete; EntropySrc& operator=(const EntropySrc&) = delete; - ~EntropySrc() noexcept = default; + +protected: + virtual ~EntropySrc() noexcept = default; }; } // namespace accumulator diff --git a/event_adder.h b/event_adder.h index 69d2266..0af2cbc 100644 --- a/event_adder.h +++ b/event_adder.h @@ -9,6 +9,9 @@ namespace accumulator { class EventAdder { public: virtual void add(const std::vector& e) = 0; + +protected: + virtual ~EventAdder() noexcept = default; }; } // namespace accumulator