Skip to content

Commit

Permalink
conditionally demangle type name
Browse files Browse the repository at this point in the history
Signed-off-by: Miaofei <miaofei@amazon.com>
  • Loading branch information
mm318 committed Dec 19, 2019
1 parent 8152876 commit 642d9ed
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion rmw_fastrtps_shared_cpp/src/rmw_get_topic_info.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ _set_rmw_topic_info(
const char * node_name,
const char * node_namespace,
TopicData topic_data,
bool no_mangle,
::ParticipantListener * slave_target,
rcutils_allocator_t * allocator)
{
Expand All @@ -143,7 +144,8 @@ _set_rmw_topic_info(
return ret;
}
// set topic type
std::string type_name = _demangle_if_ros_type(topic_data.topic_type);
std::string type_name =
no_mangle ? _demangle_if_ros_type(topic_data.topic_type) : topic_data.topic_type;
ret = rmw_topic_info_set_topic_type(topic_info, type_name.c_str(), allocator);
if (ret != RMW_RET_OK) {
return ret;
Expand Down Expand Up @@ -229,6 +231,7 @@ _get_info_by_topic(
node_name,
node_namespace,
data,
no_mangle,
slave_target,
allocator);
if (ret != RMW_RET_OK) {
Expand Down

0 comments on commit 642d9ed

Please sign in to comment.