Hold only a const version of the ProcessList in Meters

This commit is contained in:
Christian Göttsche
2020-10-21 21:25:50 +02:00
committed by cgzones
parent f757810f48
commit 72103e9613
13 changed files with 43 additions and 43 deletions

View File

@ -189,7 +189,7 @@ double Platform_setCPUValues(Meter* this, int cpu) {
}
void Platform_setMemoryValues(Meter* this) {
ProcessList* pl = (ProcessList*) this->pl;
const ProcessList* pl = this->pl;
long int usedMem = pl->usedMem;
long int buffersMem = pl->buffersMem;
long int cachedMem = pl->cachedMem;
@ -207,7 +207,7 @@ void Platform_setMemoryValues(Meter* this) {
* Taken almost directly from OpenBSD's top(1)
*/
void Platform_setSwapValues(Meter* this) {
ProcessList* pl = (ProcessList*) this->pl;
const ProcessList* pl = this->pl;
struct swapent *swdev;
unsigned long long int total, used;
int nswap, rnswap, i;