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

@ -21,8 +21,8 @@ static void CheckItem_delete(Object* cast) {
free(this);
}
static void CheckItem_display(Object* cast, RichString* out) {
CheckItem* this = (CheckItem*)cast;
static void CheckItem_display(const Object* cast, RichString* out) {
const CheckItem* this = (const CheckItem*)cast;
assert (this != NULL);
RichString_write(out, CRT_colors[CHECK_BOX], "[");
if (CheckItem_get(this))
@ -61,7 +61,7 @@ void CheckItem_set(CheckItem* this, bool value) {
this->value = value;
}
bool CheckItem_get(CheckItem* this) {
bool CheckItem_get(const CheckItem* this) {
if (this->ref)
return *(this->ref);
else