From 44a8734126db39bec4a3fe833619c120dfeeb13c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoph=20Fr=C3=B6hlich?= Date: Wed, 18 Dec 2024 20:04:45 +0100 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Sai Kishor Kothakota --- include/control_toolbox/pid_ros.hpp | 2 +- src/pid_ros.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/control_toolbox/pid_ros.hpp b/include/control_toolbox/pid_ros.hpp index c5c7802..f3481df 100644 --- a/include/control_toolbox/pid_ros.hpp +++ b/include/control_toolbox/pid_ros.hpp @@ -368,7 +368,7 @@ class CONTROL_TOOLBOX_PUBLIC PidROS * If not stated explicitly using "/" or "~", prefix is interpreted as global, i.e., * "/" will be added in front of topic prefix */ - void set_prefixes(std::string topic_prefix); + void set_prefixes(const std::string &topic_prefix); rclcpp::node_interfaces::OnSetParametersCallbackHandle::SharedPtr parameter_callback_; diff --git a/src/pid_ros.cpp b/src/pid_ros.cpp index 6628a8d..28b477b 100644 --- a/src/pid_ros.cpp +++ b/src/pid_ros.cpp @@ -92,7 +92,7 @@ PidROS::PidROS( new realtime_tools::RealtimePublisher(state_pub_)); } -void PidROS::set_prefixes(std::string topic_prefix) +void PidROS::set_prefixes(const std::string &topic_prefix) { param_prefix_ = topic_prefix; // If it starts with a "~", remove it