diff options
author | Christian Göttsche <cgzones@googlemail.com> | 2020-10-06 12:28:11 +0200 |
---|---|---|
committer | cgzones <cgzones@googlemail.com> | 2020-10-10 11:25:19 +0200 |
commit | 79ad39c718bfb2973d610c2d039a5024354e602f (patch) | |
tree | efac0bfaf60cc44a5a2b2a8c8db251cbacf5ebab /CheckItem.c | |
parent | e5fdb80c7d13d836ec244390976741dd99bc6535 (diff) |
Mark Object pointer to _display function const
Diffstat (limited to 'CheckItem.c')
-rw-r--r-- | CheckItem.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/CheckItem.c b/CheckItem.c index 09e42ee6..d1f11963 100644 --- a/CheckItem.c +++ b/CheckItem.c @@ -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 |