Avoid copying in ranged for loops
New toolchain complains about this, and it's not on purpose.
Change-Id: I5e86f9ba46bc5232831df93718196712eaba89c0
Signed-off-by: Brian Silverman <bsilver16834@gmail.com>
diff --git a/aos/events/simulated_event_loop_test.cc b/aos/events/simulated_event_loop_test.cc
index 277e783..a94b895 100644
--- a/aos/events/simulated_event_loop_test.cc
+++ b/aos/events/simulated_event_loop_test.cc
@@ -2134,7 +2134,7 @@
// Build up the list of all the messages we expect when we come back.
{
std::set<const aos::Channel *> statistics_channels;
- for (const std::pair<std::string_view, const Node *> pi :
+ for (const std::pair<std::string_view, const Node *> &pi :
std::vector<std::pair<std::string_view, const Node *>>{
{"/pi1/aos", pi1->node()},
{"/pi2/aos", pi1->node()},
@@ -2171,7 +2171,7 @@
// forwarded, mainly the timestamp message.
{
std::set<const aos::Channel *> statistics_channels;
- for (const std::pair<std::string_view, const Node *> pi :
+ for (const std::pair<std::string_view, const Node *> &pi :
std::vector<std::pair<std::string_view, const Node *>>{
{"/pi1/aos", pi1->node()}, {"/pi3/aos", pi1->node()}}) {
statistics_channels.insert(configuration::GetChannel(
@@ -2202,7 +2202,7 @@
{
std::set<const aos::Channel *> statistics_channels;
- for (const std::pair<std::string_view, const Node *> pi :
+ for (const std::pair<std::string_view, const Node *> &pi :
std::vector<std::pair<std::string_view, const Node *>>{
{"/pi1/aos", pi1->node()}, {"/pi3/aos", pi1->node()}}) {
statistics_channels.insert(configuration::GetChannel(