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

@ -41,8 +41,8 @@ static void PressureStallMeter_updateValues(Meter* this, char* buffer, int len)
xSnprintf(buffer, len, "xxxx %.2lf%% %.2lf%% %.2lf%%", this->values[0], this->values[1], this->values[2]);
}
static void PressureStallMeter_display(Object* cast, RichString* out) {
Meter* this = (Meter*)cast;
static void PressureStallMeter_display(const Object* cast, RichString* out) {
const Meter* this = (const Meter*)cast;
char buffer[20];
xSnprintf(buffer, sizeof(buffer), "%.2lf%% ", this->values[0]);
RichString_write(out, CRT_colors[PRESSURE_STALL_TEN], buffer);