@@ -44,7 +44,7 @@ void TopicPublisherROS2::updatePublishers()
4444 {
4545 return ;
4646 }
47- for (const auto & info : _topics_info)
47+ for (const auto & info : _topics_info)
4848 {
4949 auto to_publish = _topics_to_publish.find (info.topic_name );
5050 if (to_publish == _topics_to_publish.end () || to_publish->second == false )
@@ -55,7 +55,7 @@ void TopicPublisherROS2::updatePublishers()
5555 auto publisher_it = _publishers.find (info.topic_name );
5656 if (publisher_it == _publishers.end ())
5757 {
58- _publishers.insert ({info.topic_name , GenericPublisher::create (*_node, info.topic_name , info.type )});
58+ _publishers.insert ({ info.topic_name , GenericPublisher::create (*_node, info.topic_name , info.type ) });
5959 }
6060 }
6161
@@ -164,15 +164,15 @@ void TopicPublisherROS2::filterDialog()
164164
165165 dialog->ui ()->listTopics ->sortByColumn (0 , Qt::AscendingOrder);
166166
167- connect (dialog->ui ()->pushButtonSelect , &QPushButton::pressed, [dialog]()
168- {
169- for ( int row = 0 ; row < dialog-> ui ()-> listTopics -> rowCount (); row++)
170- {
171- if (!dialog-> ui ()-> listTopics -> isRowHidden (row))
172- {
173- dialog-> ui ()-> listTopics -> selectRow (row);
174- }
175- } });
167+ connect (dialog->ui ()->pushButtonSelect , &QPushButton::pressed, [dialog]() {
168+ for ( int row = 0 ; row < dialog-> ui ()-> listTopics -> rowCount (); row++)
169+ {
170+ if (!dialog-> ui ()-> listTopics -> isRowHidden (row))
171+ {
172+ dialog-> ui ()-> listTopics -> selectRow (row);
173+ }
174+ }
175+ });
176176 connect (dialog->ui ()->pushButtonDeselect , &QPushButton::pressed, dialog->ui ()->listTopics ,
177177 &QAbstractItemView::clearSelection);
178178
@@ -183,12 +183,12 @@ void TopicPublisherROS2::filterDialog()
183183 _topics_to_publish.clear ();
184184 QModelIndexList selected_indexes = dialog->ui ()->listTopics ->selectionModel ()->selectedIndexes ();
185185
186- for (const auto & info : sorted_topics)
186+ for (const auto & info : sorted_topics)
187187 {
188- _topics_to_publish.insert ({info.topic_name , false });
188+ _topics_to_publish.insert ({ info.topic_name , false });
189189 }
190190
191- for (const QModelIndex & index : selected_indexes)
191+ for (const QModelIndex& index : selected_indexes)
192192 {
193193 if (index.column () == 0 )
194194 {
@@ -203,12 +203,12 @@ void TopicPublisherROS2::filterDialog()
203203
204204constexpr long NSEC_PER_SEC = 1000000000 ;
205205
206- rcutils_time_point_value_t Convert (const builtin_interfaces::msg::Time & stamp)
206+ rcutils_time_point_value_t Convert (const builtin_interfaces::msg::Time& stamp)
207207{
208208 return stamp.nanosec + NSEC_PER_SEC * stamp.sec ;
209209}
210210
211- builtin_interfaces::msg::Time Convert (const rcutils_time_point_value_t & time_stamp)
211+ builtin_interfaces::msg::Time Convert (const rcutils_time_point_value_t & time_stamp)
212212{
213213 builtin_interfaces::msg::Time stamp;
214214 stamp.sec = static_cast <int32_t >(time_stamp / NSEC_PER_SEC);
@@ -330,14 +330,14 @@ void TopicPublisherROS2::updateState(double current_time)
330330 auto data_it = _datamap->user_defined .find (" plotjuggler::rosbag2_cpp::consecutive_messages" );
331331 if (data_it != _datamap->user_defined .end ())
332332 {
333- const PJ::PlotDataAny & continuous_msgs = data_it->second ;
333+ const PJ::PlotDataAny& continuous_msgs = data_it->second ;
334334 _previous_play_index = continuous_msgs.getIndexFromX (current_time);
335335 }
336336
337- for (const auto & data_it : _datamap->user_defined )
337+ for (const auto & data_it : _datamap->user_defined )
338338 {
339- const std::string & topic_name = data_it.first ;
340- const PJ::PlotDataAny & plot_any = data_it.second ;
339+ const std::string& topic_name = data_it.first ;
340+ const PJ::PlotDataAny& plot_any = data_it.second ;
341341
342342 if (topic_name == " /tf" || topic_name == " tf_static" )
343343 {
@@ -356,11 +356,11 @@ void TopicPublisherROS2::updateState(double current_time)
356356 continue ;
357357 }
358358
359- const auto & any_value = plot_any.at (last_index).y ;
359+ const auto & any_value = plot_any.at (last_index).y ;
360360
361361 if (any_value.type () == typeid (MessageRefPtr))
362362 {
363- const auto & msg_instance = std::any_cast<MessageRefPtr>(any_value);
363+ const auto & msg_instance = std::any_cast<MessageRefPtr>(any_value);
364364 publisher_it->second ->publish (msg_instance->serialized_data );
365365 }
366366 }
@@ -378,7 +378,7 @@ void TopicPublisherROS2::play(double current_time)
378378 {
379379 return ;
380380 }
381- const PJ::PlotDataAny & continuous_msgs = data_it->second ;
381+ const PJ::PlotDataAny& continuous_msgs = data_it->second ;
382382 int current_index = continuous_msgs.getIndexFromX (current_time);
383383
384384 if (_previous_play_index > current_index)
@@ -389,13 +389,13 @@ void TopicPublisherROS2::play(double current_time)
389389 }
390390 else
391391 {
392- const PJ::PlotDataAny & consecutive_msg = data_it->second ;
392+ const PJ::PlotDataAny& consecutive_msg = data_it->second ;
393393 for (int index = _previous_play_index + 1 ; index <= current_index; index++)
394394 {
395- const auto & any_value = consecutive_msg.at (index).y ;
395+ const auto & any_value = consecutive_msg.at (index).y ;
396396 if (any_value.type () == typeid (MessageRefPtr))
397397 {
398- const auto & msg_instance = std::any_cast<MessageRefPtr>(any_value);
398+ const auto & msg_instance = std::any_cast<MessageRefPtr>(any_value);
399399
400400 auto publisher_it = _publishers.find (msg_instance->topic_name );
401401 if (publisher_it == _publishers.end ())
0 commit comments