diff --git a/rmw_zenoh_cpp/src/detail/message_type_support.cpp b/rmw_zenoh_cpp/src/detail/message_type_support.cpp index e270a12a..8b55e2ef 100644 --- a/rmw_zenoh_cpp/src/detail/message_type_support.cpp +++ b/rmw_zenoh_cpp/src/detail/message_type_support.cpp @@ -24,11 +24,10 @@ #include "message_type_support.hpp" #include "type_support_common.hpp" -MessageTypeSupport::MessageTypeSupport(const message_type_support_callbacks_t * members) +MessageTypeSupport::MessageTypeSupport(const message_type_support_callbacks_t * members) : name(_create_type_name(members)) { assert(members); - std::string name = _create_type_name(members); this->set_name(name.c_str()); set_members(members);