diff options
-rw-r--r-- | control/zone.cpp | 8 | ||||
-rw-r--r-- | control/zone.hpp | 3 |
2 files changed, 8 insertions, 3 deletions
diff --git a/control/zone.cpp b/control/zone.cpp index ec0f944..1ca0465 100644 --- a/control/zone.cpp +++ b/control/zone.cpp @@ -441,7 +441,10 @@ void Zone::addTimer(const Group& group, ); auto timer = std::make_unique<util::Timer>( _eventLoop, - std::bind(&Zone::timerExpired, this, group, actions) + std::bind(&Zone::timerExpired, + this, + std::cref(std::get<Group>(*data)), + std::cref(std::get<std::vector<Action>>(*data))) ); if (!timer->running()) { @@ -451,7 +454,8 @@ void Zone::addTimer(const Group& group, _timerEvents.emplace_back(std::move(data), std::move(timer)); } -void Zone::timerExpired(Group eventGroup, std::vector<Action> eventActions) +void Zone::timerExpired(const Group& eventGroup, + const std::vector<Action>& eventActions) { // Perform the actions std::for_each(eventActions.begin(), diff --git a/control/zone.hpp b/control/zone.hpp index 4f4dfb6..002feb4 100644 --- a/control/zone.hpp +++ b/control/zone.hpp @@ -395,7 +395,8 @@ class Zone * @param[in] eventGroup - Group to process actions on * @param[in] eventActions - List of event actions to run */ - void timerExpired(Group eventGroup, std::vector<Action> eventActions); + void timerExpired(const Group& eventGroup, + const std::vector<Action>& eventActions); /** * @brief Get the service for a given path and interface from cached |