diff --git a/rmw_zenoh_cpp/src/detail/graph_cache.cpp b/rmw_zenoh_cpp/src/detail/graph_cache.cpp index 34121840..e0795ac8 100644 --- a/rmw_zenoh_cpp/src/detail/graph_cache.cpp +++ b/rmw_zenoh_cpp/src/detail/graph_cache.cpp @@ -365,7 +365,6 @@ void GraphCache::parse_put( {entity->node_name(), node}}; graph_.emplace(std::make_pair(entity->node_namespace(), std::move(node_map))); update_topic_maps_for_put(node, entity); - total_nodes_in_graph_ += 1; return; } diff --git a/rmw_zenoh_cpp/src/detail/liveliness_utils.cpp b/rmw_zenoh_cpp/src/detail/liveliness_utils.cpp index f321470a..dca65799 100644 --- a/rmw_zenoh_cpp/src/detail/liveliness_utils.cpp +++ b/rmw_zenoh_cpp/src/detail/liveliness_utils.cpp @@ -437,7 +437,7 @@ Entity::Entity( // returned to the RMW layer as necessary. simplified_XXH128_hash_t keyexpr_gid = simplified_XXH3_128bits(this->liveliness_keyexpr_.c_str(), this->liveliness_keyexpr_.length()); - this->gid_.reserve(RMW_GID_STORAGE_SIZE); + this->gid_.resize(RMW_GID_STORAGE_SIZE); memcpy(this->gid_.data(), &keyexpr_gid.low64, sizeof(keyexpr_gid.low64)); memcpy(this->gid_.data() + sizeof(keyexpr_gid.low64), &keyexpr_gid.high64, sizeof(keyexpr_gid.high64));