diff --git a/include/fmi4cpp/fmi2/fmu.hpp b/include/fmi4cpp/fmi2/fmu.hpp index 128f488..bc5f996 100644 --- a/include/fmi4cpp/fmi2/fmu.hpp +++ b/include/fmi4cpp/fmi2/fmu.hpp @@ -22,13 +22,13 @@ class fmu : public virtual fmu_provider private: std::shared_ptr resource_; - std::shared_ptr modelDescription_; + std::shared_ptr modelDescription_; public: explicit fmu(const std::filesystem::path& fmuPath); [[nodiscard]] std::string get_model_description_xml() const; - [[nodiscard]] std::shared_ptr get_model_description() const override; + [[nodiscard]] std::shared_ptr get_model_description() const override; [[nodiscard]] bool supports_me() const override; [[nodiscard]] bool supports_cs() const override; diff --git a/include/fmi4cpp/fmi2/me_instance.hpp b/include/fmi4cpp/fmi2/me_instance.hpp index 6623ac6..b707b2d 100644 --- a/include/fmi4cpp/fmi2/me_instance.hpp +++ b/include/fmi4cpp/fmi2/me_instance.hpp @@ -48,7 +48,7 @@ class me_instance : public fmu_instance_base [[nodiscard]] DLL_HANDLE handle() const override; - [[nodiscard]] fmi4cpp::status last_status() const override; + [[nodiscard]] status last_status() const override; }; } // namespace fmi4cpp::fmi2 diff --git a/include/fmi4cpp/fmu_base.hpp b/include/fmi4cpp/fmu_base.hpp index 5019e30..6d83f0b 100644 --- a/include/fmi4cpp/fmu_base.hpp +++ b/include/fmi4cpp/fmu_base.hpp @@ -24,6 +24,8 @@ class fmu_base } virtual std::shared_ptr get_model_description() const = 0; + + virtual ~fmu_base() = default; }; template diff --git a/include/fmi4cpp/fmu_instance.hpp b/include/fmi4cpp/fmu_instance.hpp index 1b132a2..1a8aa06 100644 --- a/include/fmi4cpp/fmu_instance.hpp +++ b/include/fmi4cpp/fmu_instance.hpp @@ -28,7 +28,7 @@ class fmu_instance : public fmu_variable_accessor [[nodiscard]] virtual DLL_HANDLE handle() const = 0; - [[nodiscard]] virtual fmi4cpp::status last_status() const = 0; + [[nodiscard]] virtual status last_status() const = 0; virtual std::shared_ptr get_model_description() const = 0; @@ -56,7 +56,7 @@ class fmu_instance : public fmu_variable_accessor const std::vector& dvKnownRef, std::vector& dvUnknownRef) = 0; - virtual ~fmu_instance() = default; + ~fmu_instance() override = default; }; } // namespace fmi4cpp diff --git a/include/fmi4cpp/fmu_variable_accessor.hpp b/include/fmi4cpp/fmu_variable_accessor.hpp index 77a94a1..21ce833 100644 --- a/include/fmi4cpp/fmu_variable_accessor.hpp +++ b/include/fmi4cpp/fmu_variable_accessor.hpp @@ -24,6 +24,8 @@ class fmu_reader virtual bool read_boolean(fmi4cppValueReference vr, fmi4cppBoolean& ref) = 0; virtual bool read_boolean(const std::vector& vr, std::vector& ref) = 0; + + virtual ~fmu_reader() = default; }; class fmu_writer @@ -49,6 +51,8 @@ class fmu_writer virtual bool write_boolean( const std::vector& vr, const std::vector& values) = 0; + + virtual ~fmu_writer() = default; }; class fmu_variable_accessor : public fmu_reader, public fmu_writer diff --git a/src/fmi4cpp/fmi2/me_instance.cpp b/src/fmi4cpp/fmi2/me_instance.cpp index 772400e..9a818c3 100644 --- a/src/fmi4cpp/fmi2/me_instance.cpp +++ b/src/fmi4cpp/fmi2/me_instance.cpp @@ -5,7 +5,7 @@ using namespace fmi4cpp::fmi2; me_instance::me_instance(fmi2Component c, - const std::shared_ptr& resource, + const std::shared_ptr& resource, const std::shared_ptr& library, const std::shared_ptr& modelDescription) : fmu_instance_base(c, resource, library, modelDescription)