diff --git a/include/caosdb/protobuf_helper.h b/include/caosdb/protobuf_helper.h index 4e0114ab4f71e64f14c0693704351487deec8dca..026887aec262befbdb19c673f534c78f615bdbeb 100644 --- a/include/caosdb/protobuf_helper.h +++ b/include/caosdb/protobuf_helper.h @@ -44,6 +44,7 @@ auto get_arena() -> Arena *; template <typename P> class ProtoMessageWrapper { public: + virtual ~ProtoMessageWrapper() = 0; ProtoMessageWrapper(const ProtoMessageWrapper<P> &other) = default; inline auto CopyFrom(const ProtoMessageWrapper<P> &other) noexcept -> StatusCode { this->wrapped->CopyFrom(*other.wrapped); @@ -86,8 +87,11 @@ protected: P *wrapped; }; +template <typename P> ProtoMessageWrapper<P>::~ProtoMessageWrapper() = default; + template <typename P> class ScalarFieldWrapper : public ProtoMessageWrapper<P> { public: + inline virtual ~ScalarFieldWrapper() = default; inline ScalarFieldWrapper() = default; inline ScalarFieldWrapper(P *wrapped) : ProtoMessageWrapper<P>(wrapped) {} /** diff --git a/test/test_entity.cpp b/test/test_entity.cpp index d4b67705bf88e5f425f270692f160e5a6cb84ac0..ad74ef6677947fcdf8c310a272584a0e54e69e88 100644 --- a/test/test_entity.cpp +++ b/test/test_entity.cpp @@ -439,10 +439,7 @@ TEST(test_entity, test_remove_property) { // P0,P1,P2,P3,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); - CAOSDB_LOG_WARN(logger_name) << entity.GetProperties().ToString(); ASSERT_EQ(entity.GetProperties().size(), 9); for (int i = 0; i < 3; i++) {