From 64c05a1ed5ea2d3589fc8239ce9065fe786c02cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20G=C3=B6ttsche?= Date: Mon, 21 Dec 2020 21:34:23 +0100 Subject: [PATCH] EnvScreen: mark local class functions static --- EnvScreen.c | 22 +++++++++++----------- EnvScreen.h | 4 ---- 2 files changed, 11 insertions(+), 15 deletions(-) diff --git a/EnvScreen.c b/EnvScreen.c index ae63d3e8..0cdc4cac 100644 --- a/EnvScreen.c +++ b/EnvScreen.c @@ -14,15 +14,6 @@ #include "XUtils.h" -const InfoScreenClass EnvScreen_class = { - .super = { - .extends = Class(Object), - .delete = EnvScreen_delete - }, - .scan = EnvScreen_scan, - .draw = EnvScreen_draw -}; - EnvScreen* EnvScreen_new(Process* process) { EnvScreen* this = xMalloc(sizeof(EnvScreen)); Object_setClass(this, Class(EnvScreen)); @@ -33,11 +24,11 @@ void EnvScreen_delete(Object* this) { free(InfoScreen_done((InfoScreen*)this)); } -void EnvScreen_draw(InfoScreen* this) { +static void EnvScreen_draw(InfoScreen* this) { InfoScreen_drawTitled(this, "Environment of process %d - %s", this->process->pid, Process_getCommand(this->process)); } -void EnvScreen_scan(InfoScreen* this) { +static void EnvScreen_scan(InfoScreen* this) { Panel* panel = this->display; int idx = MAXIMUM(Panel_getSelectedIndex(panel), 0); @@ -59,3 +50,12 @@ void EnvScreen_scan(InfoScreen* this) { Vector_insertionSort(panel->items); Panel_setSelected(panel, idx); } + +const InfoScreenClass EnvScreen_class = { + .super = { + .extends = Class(Object), + .delete = EnvScreen_delete + }, + .scan = EnvScreen_scan, + .draw = EnvScreen_draw +}; diff --git a/EnvScreen.h b/EnvScreen.h index bf385801..66d263fc 100644 --- a/EnvScreen.h +++ b/EnvScreen.h @@ -15,8 +15,4 @@ EnvScreen* EnvScreen_new(Process* process); void EnvScreen_delete(Object* this); -void EnvScreen_draw(InfoScreen* this); - -void EnvScreen_scan(InfoScreen* this); - #endif