mirror of
https://github.com/aristocratos/btop.git
synced 2024-09-30 07:01:35 +02:00
small improvement
This commit is contained in:
parent
808f09c974
commit
9f88187c29
@ -73,7 +73,6 @@ unordered_flat_map<int, double> Cpu::ThermalSensors::getSensors() {
|
|||||||
CFStringGetCString(name, buf, 200, kCFStringEncodingASCII);
|
CFStringGetCString(name, buf, 200, kCFStringEncodingASCII);
|
||||||
std::string n(buf);
|
std::string n(buf);
|
||||||
if (n.starts_with("PMU tdie")) {
|
if (n.starts_with("PMU tdie")) {
|
||||||
// Apple Silicon
|
|
||||||
std::string indexString = n.substr(8, 1);
|
std::string indexString = n.substr(8, 1);
|
||||||
int index = stoi(indexString);
|
int index = stoi(indexString);
|
||||||
cpuValues[index - 1] = getValue(sc);
|
cpuValues[index - 1] = getValue(sc);
|
||||||
@ -85,7 +84,7 @@ unordered_flat_map<int, double> Cpu::ThermalSensors::getSensors() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
CFRelease(matchingsrvs);
|
CFRelease(matchingsrvs);
|
||||||
CFRelease(thermalSensors);
|
|
||||||
CFRelease(system);
|
CFRelease(system);
|
||||||
|
CFRelease(thermalSensors);
|
||||||
return cpuValues;
|
return cpuValues;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user