mirror of
https://github.com/xzeldon/htop.git
synced 2025-07-12 12:14:36 +03:00
Misc Vector updates
- Move swap() macro to source file and implement as function - Implement Vector_get() and Vector_size() as inline functions to make them type safe and avoid lhs usage - Comment comparison statistics, they are only needed for performance testing
This commit is contained in:

committed by
cgzones

parent
a63cfc8b7c
commit
e9246abff8
@ -127,12 +127,12 @@ static void ProcessList_buildTree(ProcessList* this, pid_t pid, int level, int i
|
||||
Process* process = (Process*) (Vector_get(children, i));
|
||||
if (!show)
|
||||
process->show = false;
|
||||
int s = this->processes2->items;
|
||||
int s = Vector_size(this->processes2);
|
||||
if (direction == 1)
|
||||
Vector_add(this->processes2, process);
|
||||
else
|
||||
Vector_insert(this->processes2, 0, process);
|
||||
assert(this->processes2->items == s+1); (void)s;
|
||||
assert(Vector_size(this->processes2) == s+1); (void)s;
|
||||
int nextIndent = indent | (1 << level);
|
||||
ProcessList_buildTree(this, process->pid, level+1, (i < size - 1) ? nextIndent : indent, direction, show ? process->showChildren : false);
|
||||
if (i == size - 1)
|
||||
|
Reference in New Issue
Block a user