Mark Object classes and Object class fields const

This commit is contained in:
Christian Göttsche
2020-10-04 17:55:08 +02:00
committed by cgzones
parent 164051354f
commit 08d85e6143
20 changed files with 45 additions and 47 deletions

View File

@ -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);