Skip to content

Commit 883ec29

Browse files
committed
Replace foreach with range-based for loop
1 parent 7b44b5a commit 883ec29

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

src/TopicPublisherROS2/publisher_ros2.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -172,8 +172,7 @@ void TopicPublisherROS2::filterDialog()
172172
{
173173
dialog->ui()->listTopics->selectRow(row);
174174
}
175-
}
176-
});
175+
} });
177176
connect(dialog->ui()->pushButtonDeselect, &QPushButton::pressed, dialog->ui()->listTopics,
178177
&QAbstractItemView::clearSelection);
179178

@@ -189,7 +188,7 @@ void TopicPublisherROS2::filterDialog()
189188
_topics_to_publish.insert({info.topic_name, false});
190189
}
191190

192-
foreach (QModelIndex index, selected_indexes)
191+
for (const QModelIndex &index : selected_indexes)
193192
{
194193
if (index.column() == 0)
195194
{

0 commit comments

Comments
 (0)