diff options
author | Christian Göttsche <cgzones@googlemail.com> | 2021-01-05 23:42:55 +0100 |
---|---|---|
committer | BenBE <BenBE@geshi.org> | 2021-01-11 20:12:34 +0100 |
commit | d72b0a682ecad0a8d5793022733447e855a61798 (patch) | |
tree | d9bc511bb716030fd73675bd3474e5a043636d73 /ScreenManager.c | |
parent | 1b2d48bc9aa93254c48d10bb34acde9596b526b9 (diff) |
Mark several non-modified pointer variables const
Diffstat (limited to 'ScreenManager.c')
-rw-r--r-- | ScreenManager.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ScreenManager.c b/ScreenManager.c index 0ab5231b..64af535b 100644 --- a/ScreenManager.c +++ b/ScreenManager.c @@ -42,14 +42,14 @@ void ScreenManager_delete(ScreenManager* this) { free(this); } -inline int ScreenManager_size(ScreenManager* this) { +inline int ScreenManager_size(const ScreenManager* this) { return this->panelCount; } void ScreenManager_add(ScreenManager* this, Panel* item, int size) { int lastX = 0; if (this->panelCount > 0) { - Panel* last = (Panel*) Vector_get(this->panels, this->panelCount - 1); + const Panel* last = (const Panel*) Vector_get(this->panels, this->panelCount - 1); lastX = last->x + last->w + 1; } int height = LINES - this->y1 + this->y2; @@ -181,7 +181,7 @@ void ScreenManager_run(ScreenManager* this, Panel** lastFocus, int* lastKey) { if (panel == panelFocus || this->allowFocusChange) { focus = i; panelFocus = panel; - Object* oldSelection = Panel_getSelected(panel); + const Object* oldSelection = Panel_getSelected(panel); Panel_setSelected(panel, mevent.y - panel->y + panel->scrollV - 1); if (Panel_getSelected(panel) == oldSelection) { ch = KEY_RECLICK; |