diff --git a/bazaar/SysInfo/SysInfo.cpp b/bazaar/SysInfo/SysInfo.cpp index 6cdbd1e60..5764887fe 100644 --- a/bazaar/SysInfo/SysInfo.cpp +++ b/bazaar/SysInfo/SysInfo.cpp @@ -483,20 +483,16 @@ static double GetCpuTemperatureACPI() { } static double GetCpuTemperatureHWMON() { - Vector temps; + double sumTemps = 0.; for (FindFile ff("/sys/class/hwmon/hwmon0/device/*input"); ff; ff.Next()) { if (!ff.IsHidden()) { String temp = LoadFile_Safe(ff.GetPath()); if (!temp.IsEmpty()) - temps.Add((double)StrInt(temp) / 1000.0); + sumTemps += double(StrInt(temp))/1000.; } } if (temps.IsEmpty()) return Null; - double sumTemps = 0.; - for (int i = 0; i < temps.GetCount(); i++) - sumTemps += temps[i]; - return sumTemps/double(temps.GetCount()); }