File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed
rmw_fastrtps_shared_cpp/src Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ std::string
5252_demangle_service_from_topic (const std::string & topic_name)
5353{
5454 std::string prefix = _get_ros_prefix_if_exists (topic_name);
55- if (! prefix.length ()) {
55+ if (prefix.empty ()) {
5656 // not a ROS topic or service
5757 return " " ;
5858 }
Original file line number Diff line number Diff line change @@ -416,13 +416,13 @@ __rmw_get_service_names_and_types_by_node(
416416 if (node_topics != topic_cache.getParticipantToTopics ().end ()) {
417417 for (auto & topic_pair : node_topics->second ) {
418418 std::string service_name = _demangle_service_from_topic (topic_pair.first );
419- if (! service_name.length ()) {
419+ if (service_name.empty ()) {
420420 // not a service
421421 continue ;
422422 }
423423 for (auto & itt : topic_pair.second ) {
424424 std::string service_type = _demangle_service_type_only (itt);
425- if (service_type.length ()) {
425+ if (! service_type.empty ()) {
426426 services[service_name].insert (service_type);
427427 }
428428 }
Original file line number Diff line number Diff line change @@ -72,13 +72,13 @@ __rmw_get_service_names_and_types(
7272 std::lock_guard<std::mutex> guard (topic_cache.getMutex ());
7373 for (auto it : topic_cache.getTopicToTypes ()) {
7474 std::string service_name = _demangle_service_from_topic (it.first );
75- if (! service_name.length ()) {
75+ if (service_name.empty ()) {
7676 // not a service
7777 continue ;
7878 }
7979 for (auto & itt : it.second ) {
8080 std::string service_type = _demangle_service_type_only (itt);
81- if (service_type.length ()) {
81+ if (! service_type.empty ()) {
8282 services[service_name].insert (service_type);
8383 }
8484 }
You can’t perform that action at this time.
0 commit comments