main.cpp (f54b260b6261f644a65efe5445a9e93a418c2eed) main.cpp (18d5bb18dcb4ebf7340b0b7a0b39daa887d530ce)
1/**
2 * Copyright 2017 Google Inc.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0

--- 70 unchanged lines hidden (view full) ---

79
80void restartControlLoops()
81{
82 static SensorManager mgmr;
83 static std::unordered_map<int64_t, std::shared_ptr<ZoneInterface>> zones;
84 static std::vector<std::shared_ptr<boost::asio::steady_timer>> timers;
85 static bool isCanceling = false;
86
1/**
2 * Copyright 2017 Google Inc.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0

--- 70 unchanged lines hidden (view full) ---

79
80void restartControlLoops()
81{
82 static SensorManager mgmr;
83 static std::unordered_map<int64_t, std::shared_ptr<ZoneInterface>> zones;
84 static std::vector<std::shared_ptr<boost::asio::steady_timer>> timers;
85 static bool isCanceling = false;
86
87 for (const auto timer : timers)
87 for (const auto& timer : timers)
88 {
89 timer->cancel();
90 }
91 isCanceling = true;
92 timers.clear();
93
94 if (zones.size() > 0 && zones.begin()->second.use_count() > 1)
95 {

--- 203 unchanged lines hidden ---
88 {
89 timer->cancel();
90 }
91 isCanceling = true;
92 timers.clear();
93
94 if (zones.size() > 0 && zones.begin()->second.use_count() > 1)
95 {

--- 203 unchanged lines hidden ---