@@ -37,8 +37,8 @@ cras::GenericLazyPubSub::GenericLazyPubSub(
37
37
const size_t inQueueSize, const size_t outQueueSize, CallbackType callback,
38
38
ros::SubscribeOptions subscribeOptions, const cras::LogHelperPtr& logHelper) :
39
39
cras::ConditionalSubscriber(cras::bind_front(&cras::GenericLazyPubSub::subscribe, this ), logHelper),
40
- topicIn(topicIn), topicOut(topicOut), callback(std::move(callback)), subscribeOptions(std::move(subscribeOptions) ),
41
- inQueueSize(inQueueSize ), outQueueSize(outQueueSize ), nhIn(nhIn), nhOut(nhOut )
40
+ topicIn(topicIn), topicOut(topicOut), inQueueSize(inQueueSize), outQueueSize(outQueueSize ),
41
+ nhIn(nhIn ), nhOut(nhOut ), callback(std::move(callback)), subscribeOptions(std::move(subscribeOptions) )
42
42
{
43
43
// We have to connect at the beginning so that we can create the publisher from a subscribed message.
44
44
std::lock_guard<std::mutex> lock (this ->connectMutex );
@@ -105,7 +105,7 @@ ros::AdvertiseOptions cras::GenericLazyPubSub::createAdvertiseOptions(
105
105
opts.has_header = cras::hasHeader (*msg);
106
106
if (event.getConnectionHeaderPtr () != nullptr )
107
107
{
108
- const auto header = event.getConnectionHeader ();
108
+ const auto & header = event.getConnectionHeader ();
109
109
opts.latch = header.find (" latching" ) != header.end () && event.getConnectionHeader ()[" latching" ] == " 1" ;
110
110
}
111
111
return opts;
0 commit comments