Skip to content

Commit ec5fcf9

Browse files
committed
Replace foreach with range-based for loop
1 parent 44948d2 commit ec5fcf9

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
@@ -174,8 +174,7 @@ void TopicPublisherROS2::filterDialog()
174174
{
175175
dialog->ui()->listTopics->selectRow(row);
176176
}
177-
}
178-
});
177+
} });
179178
connect(dialog->ui()->pushButtonDeselect, &QPushButton::pressed, dialog->ui()->listTopics,
180179
&QAbstractItemView::clearSelection);
181180

@@ -191,7 +190,7 @@ void TopicPublisherROS2::filterDialog()
191190
_topics_to_publish.insert({info.topic_name, false});
192191
}
193192

194-
foreach (QModelIndex index, selected_indexes)
193+
for (const QModelIndex &index : selected_indexes)
195194
{
196195
if (index.column() == 0)
197196
{

0 commit comments

Comments
 (0)