From d58c2f0606dd6d56d4b70f0367d6309ba3964a19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20G=C3=B6ttsche?= Date: Sun, 18 Apr 2021 15:50:56 +0200 Subject: Drop ProcessList_get and ProcessList_size Only used inside ProcessList.c and only once each. --- ProcessList.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'ProcessList.c') diff --git a/ProcessList.c b/ProcessList.c index 1a84b651..fa8ff4a4 100644 --- a/ProcessList.c +++ b/ProcessList.c @@ -168,14 +168,6 @@ void ProcessList_remove(ProcessList* this, const Process* p) { assert(Hashtable_count(this->processTable) == Vector_count(this->processes)); } -Process* ProcessList_get(ProcessList* this, int idx) { - return (Process*)Vector_get(this->processes, idx); -} - -int ProcessList_size(const ProcessList* this) { - return Vector_size(this->processes); -} - // ProcessList_updateTreeSetLayer sorts this->displayTreeSet, // relying only on itself. // @@ -530,12 +522,12 @@ void ProcessList_rebuildPanel(ProcessList* this) { } } - const int processCount = ProcessList_size(this); + const int processCount = Vector_size(this->processes); int idx = 0; bool foundFollowed = false; for (int i = 0; i < processCount; i++) { - Process* p = ProcessList_get(this, i); + Process* p = (Process*) Vector_get(this->processes, i); if ( (!p->show) || (this->userId != (uid_t) -1 && (p->st_uid != this->userId)) -- cgit v1.2.3