diff options
author | Patrick Venture <venture@google.com> | 2018-10-23 19:42:23 -0700 |
---|---|---|
committer | Patrick Venture <venture@google.com> | 2018-11-02 14:42:03 +0000 |
commit | db7ecb6aaa066a2468aaa82cd1dfdbe60f3793eb (patch) | |
tree | 0f127e60feecb240a7d3d811e7239390d45f284a | |
parent | 0dd0c4d728757b78d07f57fe3f92193960ac7076 (diff) | |
download | phosphor-hwmon-db7ecb6aaa066a2468aaa82cd1dfdbe60f3793eb.tar.gz phosphor-hwmon-db7ecb6aaa066a2468aaa82cd1dfdbe60f3793eb.zip |
cleanup: add const to read-only iterators
Add const to read-only iterators.
Change-Id: I848ec6a9558781fc193e19efa63494ec0cea3f46
Signed-off-by: Patrick Venture <venture@google.com>
-rw-r--r-- | mainloop.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mainloop.cpp b/mainloop.cpp index 5cae0d3..4db0940 100644 --- a/mainloop.cpp +++ b/mainloop.cpp @@ -310,7 +310,7 @@ void MainLoop::init() // Check sysfs for available sensors. auto sensors = std::make_unique<SensorSet>(_hwmonRoot + '/' + _instance); - for (auto& i : *sensors) + for (const auto& i : *sensors) { auto object = getObject(i); if (object) @@ -475,7 +475,7 @@ void MainLoop::read() } // Remove any sensors marked for removal - for (auto& i : rmSensors) + for (const auto& i : rmSensors) { state.erase(i.first); } |