Skip to content

Commit 7cd3c8e

Browse files
authored
Fix compile problem when open -Wnon-virtual-dtor compile flag (#10705)
* Fix compile problem when open -Wnon-virtual-dtor compile flag * update code style * fix the code style
1 parent d3ded2f commit 7cd3c8e

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

src/core/include/openvino/core/any.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -541,6 +541,8 @@ class OPENVINO_API Any {
541541
template <typename... Args>
542542
Impl(Args&&... args) : value(std::forward<Args>(args)...) {}
543543

544+
virtual ~Impl(){};
545+
544546
const std::type_info& type_info() const override {
545547
return typeid(T);
546548
}

src/core/include/openvino/op/util/variable_extension.hpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ class OPENVINO_API VariableExtension {
3838
/// \brief Returns the identifier of corresponding variable.
3939
virtual std::string get_variable_id() const = 0;
4040

41+
protected:
42+
virtual ~VariableExtension(){};
43+
4144
protected:
4245
std::shared_ptr<Variable> m_variable;
4346
};

0 commit comments

Comments
 (0)