From 49831a24b00ea46b749fbd6fe9101fb74fbc6972 Mon Sep 17 00:00:00 2001 From: Sergey Parfenyuk Date: Sat, 27 Apr 2019 12:37:24 +0200 Subject: [PATCH] Add virtual destructor for abstract classes --- include/CacheBase.h | 1 + include/ClipBase.h | 1 + include/EffectBase.h | 1 + include/PlayerBase.h | 1 + include/ReaderBase.h | 2 ++ include/WriterBase.h | 2 ++ 6 files changed, 8 insertions(+) diff --git a/include/CacheBase.h b/include/CacheBase.h index aaef5320..a7f8c88f 100644 --- a/include/CacheBase.h +++ b/include/CacheBase.h @@ -109,6 +109,7 @@ namespace openshot { virtual void SetJson(string value) = 0; ///< Load JSON string into this object virtual Json::Value JsonValue() = 0; ///< Generate Json::JsonValue for this object virtual void SetJsonValue(Json::Value root) = 0; ///< Load Json::JsonValue into this object + virtual ~CacheBase() = default; }; diff --git a/include/ClipBase.h b/include/ClipBase.h index 3dae8a53..4678f25a 100644 --- a/include/ClipBase.h +++ b/include/ClipBase.h @@ -101,6 +101,7 @@ namespace openshot { /// of all properties at any time) virtual string PropertiesJSON(int64_t requested_frame) = 0; + virtual ~ClipBase() = default; }; diff --git a/include/EffectBase.h b/include/EffectBase.h index d38e3f45..26add05d 100644 --- a/include/EffectBase.h +++ b/include/EffectBase.h @@ -105,6 +105,7 @@ namespace openshot /// Set the order that this effect should be executed. void Order(int new_order) { order = new_order; } + virtual ~EffectBase() = default; }; } diff --git a/include/PlayerBase.h b/include/PlayerBase.h index ecc222a8..f1ce2d80 100644 --- a/include/PlayerBase.h +++ b/include/PlayerBase.h @@ -104,6 +104,7 @@ namespace openshot /// Set the Volume (1.0 = normal volume, <1.0 = quieter, >1.0 louder) virtual void Volume(float new_volume) = 0; + virtual ~PlayerBase() = default; }; } diff --git a/include/ReaderBase.h b/include/ReaderBase.h index b0a1b3db..ce665f1d 100644 --- a/include/ReaderBase.h +++ b/include/ReaderBase.h @@ -147,6 +147,8 @@ namespace openshot /// Open the reader (and start consuming resources, such as images or video files) virtual void Open() = 0; + + virtual ~ReaderBase() = default; }; } diff --git a/include/WriterBase.h b/include/WriterBase.h index 8f424054..3fd80c7f 100644 --- a/include/WriterBase.h +++ b/include/WriterBase.h @@ -116,6 +116,8 @@ namespace openshot /// Open the writer (and start initializing streams) virtual void Open() = 0; + + virtual ~WriterBase() = default; }; }