Skip to content

Commit

Permalink
/ separater
Browse files Browse the repository at this point in the history
  • Loading branch information
Shivang Vijay committed Apr 3, 2024
1 parent 4556929 commit 2c2c8d8
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions rmw_zenoh_cpp/src/rmw_zenoh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,17 +81,8 @@ namespace
// careful about who owns the string.
z_owned_keyexpr_t ros_topic_name_to_zenoh_key(const char * const topic_name, size_t domain_id)
{
std::string d = std::to_string(domain_id);

size_t start_offset = 0;
size_t topic_name_len = strlen(topic_name);
size_t end_offset = topic_name_len;

const std::string mangled_topic_name = liveliness::mangle_name(topic_name);

return z_keyexpr_join(
z_keyexpr(d.c_str()),
z_keyexpr(mangled_topic_name.c_str()));
const std::string keyexpr_str = std::to_string(domain_id) + "/" + liveliness::mangle_name(topic_name);
return z_keyexpr_new(keyexpr_str.c_str());
}

//==============================================================================
Expand Down

0 comments on commit 2c2c8d8

Please sign in to comment.