mirror of
https://github.com/xzeldon/htop.git
synced 2025-07-12 12:14:36 +03:00
Mark Object classes and Object class fields const
This commit is contained in:

committed by
cgzones

parent
164051354f
commit
08d85e6143
@ -191,7 +191,7 @@ double Platform_setCPUValues(Meter* this, int cpu) {
|
||||
v[CPU_METER_STEAL] = cpuData->stealPeriod / total * 100.0;
|
||||
v[CPU_METER_GUEST] = cpuData->guestPeriod / total * 100.0;
|
||||
v[CPU_METER_IOWAIT] = cpuData->ioWaitPeriod / total * 100.0;
|
||||
Meter_setItems(this, 8);
|
||||
this->curItems = 8;
|
||||
if (this->pl->settings->accountGuestInCPUMeter) {
|
||||
percent = v[0]+v[1]+v[2]+v[3]+v[4]+v[5]+v[6];
|
||||
} else {
|
||||
@ -200,7 +200,7 @@ double Platform_setCPUValues(Meter* this, int cpu) {
|
||||
} else {
|
||||
v[2] = cpuData->systemAllPeriod / total * 100.0;
|
||||
v[3] = (cpuData->stealPeriod + cpuData->guestPeriod) / total * 100.0;
|
||||
Meter_setItems(this, 4);
|
||||
this->curItems = 4;
|
||||
percent = v[0]+v[1]+v[2]+v[3];
|
||||
}
|
||||
percent = CLAMP(percent, 0.0, 100.0);
|
||||
|
Reference in New Issue
Block a user