Skip to content

Commit

Permalink
Fix compile problem when open -Wnon-virtual-dtor compile flag (#10705)
Browse files Browse the repository at this point in the history
* Fix compile problem when open -Wnon-virtual-dtor compile flag

* update code style

* fix the code style
  • Loading branch information
csy0225 committed Mar 2, 2022
1 parent d3ded2f commit 7cd3c8e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/core/include/openvino/core/any.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -541,6 +541,8 @@ class OPENVINO_API Any {
template <typename... Args>
Impl(Args&&... args) : value(std::forward<Args>(args)...) {}

virtual ~Impl(){};

const std::type_info& type_info() const override {
return typeid(T);
}
Expand Down
3 changes: 3 additions & 0 deletions src/core/include/openvino/op/util/variable_extension.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ class OPENVINO_API VariableExtension {
/// \brief Returns the identifier of corresponding variable.
virtual std::string get_variable_id() const = 0;

protected:
virtual ~VariableExtension(){};

protected:
std::shared_ptr<Variable> m_variable;
};
Expand Down

0 comments on commit 7cd3c8e

Please sign in to comment.