diff --git a/thermal/Thermal.cpp b/thermal/Thermal.cpp index 578edcf..f68b27f 100644 --- a/thermal/Thermal.cpp +++ b/thermal/Thermal.cpp @@ -487,7 +487,7 @@ void Thermal::CheckThermalServerity() { kTemp_2_0.throttlingStatus = (ThrottlingSeverity)i; { std::lock_guard _lock(thermal_callback_mutex_); - for (auto cb : callbacks_) { + for (auto& cb : callbacks_) { cb.callback->notifyThrottling(kTemp_2_0); } } @@ -500,7 +500,7 @@ void Thermal::CheckThermalServerity() { kTemp_2_0_1.throttlingStatus = (ThrottlingSeverity)i; { std::lock_guard _lock(thermal_callback_mutex_); - for (auto cb : callbacks_) { + for (auto& cb : callbacks_) { cb.callback->notifyThrottling(kTemp_2_0_1); } }