Mark Object pointer to _display function const

This commit is contained in:
Christian Göttsche
2020-10-06 12:28:11 +02:00
committed by cgzones
parent e5fdb80c7d
commit 79ad39c718
17 changed files with 44 additions and 45 deletions

View File

@ -34,9 +34,9 @@ static void SwapMeter_updateValues(Meter* this, char* buffer, int size) {
}
}
static void SwapMeter_display(Object* cast, RichString* out) {
static void SwapMeter_display(const Object* cast, RichString* out) {
char buffer[50];
Meter* this = (Meter*)cast;
const Meter* this = (const Meter*)cast;
RichString_write(out, CRT_colors[METER_TEXT], ":");
Meter_humanUnit(buffer, this->total, 50);
RichString_append(out, CRT_colors[METER_VALUE], buffer);