mirror of https://github.com/xzeldon/htop.git
Drop ProcessList_get and ProcessList_size
Only used inside ProcessList.c and only once each.
This commit is contained in:
parent
5dbca0193d
commit
d58c2f0606
|
@ -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))
|
||||
|
|
|
@ -99,10 +99,6 @@ void ProcessList_add(ProcessList* this, Process* p);
|
|||
|
||||
void ProcessList_remove(ProcessList* this, const Process* p);
|
||||
|
||||
Process* ProcessList_get(ProcessList* this, int idx);
|
||||
|
||||
int ProcessList_size(const ProcessList* this);
|
||||
|
||||
void ProcessList_sort(ProcessList* this);
|
||||
|
||||
ProcessField ProcessList_keyAt(const ProcessList* this, int at);
|
||||
|
|
Loading…
Reference in New Issue