From d1ff6a7c72c22ccf19ac9a4ac160101ec15c565f Mon Sep 17 00:00:00 2001 From: Enrique Fernandez Date: Fri, 27 Apr 2018 16:54:12 -0400 Subject: [PATCH] Use const reference for std::string --- nodelet_topic_tools/include/nodelet_topic_tools/nodelet_lazy.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nodelet_topic_tools/include/nodelet_topic_tools/nodelet_lazy.h b/nodelet_topic_tools/include/nodelet_topic_tools/nodelet_lazy.h index a7bb7db9..5d39bbe1 100644 --- a/nodelet_topic_tools/include/nodelet_topic_tools/nodelet_lazy.h +++ b/nodelet_topic_tools/include/nodelet_topic_tools/nodelet_lazy.h @@ -232,7 +232,7 @@ class NodeletLazy: public nodelet::Nodelet */ template ros::Publisher advertise(ros::NodeHandle& nh, - std::string topic, int queue_size, bool latch=false) + const std::string& topic, int queue_size, bool latch=false) { boost::mutex::scoped_lock lock(connection_mutex_); ros::SubscriberStatusCallback connect_cb