summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJos Dehaes <jos.dehaes@gmail.com>2021-10-16 21:06:18 +0200
committerJos Dehaes <jos.dehaes@gmail.com>2021-10-16 21:06:18 +0200
commit9f88187c29821148c7a5272926d204bd3eb39f89 (patch)
tree946f4ee3a694201a0744bb4209964974cd0c79d5
parent808f09c97465e8cf511f7690b40a69cd8a2efa15 (diff)
small improvement
-rw-r--r--src/osx/sensors.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/osx/sensors.cpp b/src/osx/sensors.cpp
index ef423df..a3d79a6 100644
--- a/src/osx/sensors.cpp
+++ b/src/osx/sensors.cpp
@@ -73,7 +73,6 @@ unordered_flat_map<int, double> Cpu::ThermalSensors::getSensors() {
CFStringGetCString(name, buf, 200, kCFStringEncodingASCII);
std::string n(buf);
if (n.starts_with("PMU tdie")) {
- // Apple Silicon
std::string indexString = n.substr(8, 1);
int index = stoi(indexString);
cpuValues[index - 1] = getValue(sc);
@@ -85,7 +84,7 @@ unordered_flat_map<int, double> Cpu::ThermalSensors::getSensors() {
}
}
CFRelease(matchingsrvs);
- CFRelease(thermalSensors);
CFRelease(system);
+ CFRelease(thermalSensors);
return cpuValues;
}