mirror of
https://github.com/xzeldon/htop.git
synced 2025-07-14 04:54:37 +03:00
Merge branch 'ci-hwloc-job' of https://github.com/bertwesarg/htop into bertwesarg-ci-hwloc-job
This commit is contained in:
12
Vector.c
12
Vector.c
@ -335,3 +335,15 @@ inline int Vector_indexOf(Vector* this, void* search_, Object_Compare compare) {
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
void Vector_splice(Vector* this, Vector* from) {
|
||||
assert(Vector_isConsistent(this));
|
||||
assert(Vector_isConsistent(from));
|
||||
assert(!(this->owner && from->owner));
|
||||
|
||||
int olditmes = this->items;
|
||||
this->items += from->items;
|
||||
Vector_checkArraySize(this);
|
||||
for (int j = 0; j < from->items; j++)
|
||||
this->array[olditmes + j] = from->array[j];
|
||||
}
|
||||
|
Reference in New Issue
Block a user