Skip to content
Snippets Groups Projects
Verified Commit 5b7c9a49 authored by Timm Fitschen's avatar Timm Fitschen
Browse files

BUG: Fix missing virtual destructor

parent 632dec3d
Branches
Tags
1 merge request!25F cpp to string
Pipeline #13916 passed
Pipeline: caosdb-cppinttest

#13917

    ...@@ -44,6 +44,7 @@ auto get_arena() -> Arena *; ...@@ -44,6 +44,7 @@ auto get_arena() -> Arena *;
    template <typename P> class ProtoMessageWrapper { template <typename P> class ProtoMessageWrapper {
    public: public:
    virtual ~ProtoMessageWrapper() = 0;
    ProtoMessageWrapper(const ProtoMessageWrapper<P> &other) = default; ProtoMessageWrapper(const ProtoMessageWrapper<P> &other) = default;
    inline auto CopyFrom(const ProtoMessageWrapper<P> &other) noexcept -> StatusCode { inline auto CopyFrom(const ProtoMessageWrapper<P> &other) noexcept -> StatusCode {
    this->wrapped->CopyFrom(*other.wrapped); this->wrapped->CopyFrom(*other.wrapped);
    ...@@ -86,8 +87,11 @@ protected: ...@@ -86,8 +87,11 @@ protected:
    P *wrapped; P *wrapped;
    }; };
    template <typename P> ProtoMessageWrapper<P>::~ProtoMessageWrapper() = default;
    template <typename P> class ScalarFieldWrapper : public ProtoMessageWrapper<P> { template <typename P> class ScalarFieldWrapper : public ProtoMessageWrapper<P> {
    public: public:
    inline virtual ~ScalarFieldWrapper() = default;
    inline ScalarFieldWrapper() = default; inline ScalarFieldWrapper() = default;
    inline ScalarFieldWrapper(P *wrapped) : ProtoMessageWrapper<P>(wrapped) {} inline ScalarFieldWrapper(P *wrapped) : ProtoMessageWrapper<P>(wrapped) {}
    /** /**
    ......
    ...@@ -439,10 +439,7 @@ TEST(test_entity, test_remove_property) { ...@@ -439,10 +439,7 @@ TEST(test_entity, test_remove_property) {
    // P0,P1,P2,P3,P4,P5,P6,P7,P8,P9 // P0,P1,P2,P3,P4,P5,P6,P7,P8,P9
    // ^ // ^
    // P0,P1,P2, P4,P5,P6,P7,P8,P9 // P0,P1,P2, P4,P5,P6,P7,P8,P9
    CAOSDB_LOG_WARN(logger_name) << "REMOVE(3)!!!!!!!!!!!!!!!!!!!!!";
    CAOSDB_LOG_WARN(logger_name) << entity.GetProperties().ToString();
    entity.RemoveProperty(3); entity.RemoveProperty(3);
    CAOSDB_LOG_WARN(logger_name) << entity.GetProperties().ToString();
    ASSERT_EQ(entity.GetProperties().size(), 9); ASSERT_EQ(entity.GetProperties().size(), 9);
    for (int i = 0; i < 3; i++) { for (int i = 0; i < 3; i++) {
    ......
    0% Loading or .
    You are about to add 0 people to the discussion. Proceed with caution.
    Please register or to comment