Skip to content

Commit

Permalink
MemorySwapMeter: Read height from sub-meter objects
Browse files Browse the repository at this point in the history
The Meter objects have their own 'h' properties.
Avoid access to the `Meter_modes` array.

Signed-off-by: Kang-Che Sung <[email protected]>
  • Loading branch information
Explorer09 committed Apr 18, 2024
1 parent b420bf7 commit 1f75060
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion MemorySwapMeter.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ static void MemorySwapMeter_updateMode(Meter* this, int mode) {
Meter_setMode(data->memoryMeter, mode);
Meter_setMode(data->swapMeter, mode);

this->h = MAXIMUM(Meter_modes[data->memoryMeter->mode]->h, Meter_modes[data->swapMeter->mode]->h);
this->h = MAXIMUM(data->memoryMeter->h, data->swapMeter->h);
}

static void MemorySwapMeter_done(Meter* this) {
Expand Down

0 comments on commit 1f75060

Please sign in to comment.