Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use reference in range loops to avoid copy #577

Merged
merged 1 commit into from
Jul 16, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@ void InteractiveMarker::updateControls(

// Maintain a set of old controls to delete
std::set<std::string> old_names_to_delete;
for (const auto name_control_pair : controls_) {
for (const auto & name_control_pair : controls_) {
old_names_to_delete.insert(name_control_pair.first);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ void InteractiveMarkerDisplay::update(float wall_dt, float ros_dt)

interactive_marker_client_->update();

for (const auto name_marker_pair : interactive_markers_map_) {
for (const auto & name_marker_pair : interactive_markers_map_) {
name_marker_pair.second->update();
}
}
Expand Down Expand Up @@ -358,7 +358,7 @@ void InteractiveMarkerDisplay::updateShowDescriptions()
{
bool show = show_descriptions_property_->getBool();

for (const auto name_marker_pair : interactive_markers_map_) {
for (const auto & name_marker_pair : interactive_markers_map_) {
name_marker_pair.second->setShowDescription(show);
}
}
Expand All @@ -367,7 +367,7 @@ void InteractiveMarkerDisplay::updateShowAxes()
{
bool show = show_axes_property_->getBool();

for (const auto name_marker_pair : interactive_markers_map_) {
for (const auto & name_marker_pair : interactive_markers_map_) {
name_marker_pair.second->setShowAxes(show);
}
}
Expand All @@ -376,7 +376,7 @@ void InteractiveMarkerDisplay::updateShowVisualAids()
{
bool show = show_visual_aids_property_->getBool();

for (const auto name_marker_pair : interactive_markers_map_) {
for (const auto & name_marker_pair : interactive_markers_map_) {
name_marker_pair.second->setShowVisualAids(show);
}
}
Expand Down