control/zone: Use const references when iterating
We don't want to copy the object out of the container we are iterating
over.
Tested:
Built and run through unit tests.
Change-Id: I68b041f98e1c6a6a9dbc59448b629e1d22ba62c9
Signed-off-by: William A. Kennington III <wak@google.com>
diff --git a/control/zone.cpp b/control/zone.cpp
index d37701e..7b19acc 100644
--- a/control/zone.cpp
+++ b/control/zone.cpp
@@ -419,7 +419,7 @@
{
for (auto it = _timerEvents.begin(); it != _timerEvents.end(); ++it)
{
- auto teEventData = *std::get<timerEventDataPos>(*it);
+ const auto& teEventData = *std::get<timerEventDataPos>(*it);
if (std::get<eventActionsPos>(teEventData).size() ==
eventActions.size())
{