fn() arrayClearSpaceDestroys the begin of an array and keeps the rest.
Destroys the begin of an array and keeps the rest.
Defined in | <seqan/basic.h> |
---|---|
Signature |
void arrayClearSpace(arrBegin, arrLength, keepFrom, moveTo);
|
Parameters
arrBegin
|
Pointer to the first element of the array. |
---|---|
keepFrom
|
Offset of the first object that will be kept. |
arrLength
|
Length of the array. |
moveTo
|
Offset the first kept object will get at the end of the function. |
Detailed Description
The objects arr[keep_from] to arr[arr_length-1] are moved to the area beginning at positions move_to. All objects in arr[0] to arr[keep_from-1] are destroyed. After this function, the first move_to positions of the array are free and dont contain objects.
The array must have at least enough space to store arr_length + move_to - keep_from objects.
The objects from arr[0] to arr[array_length-1] have to be initialized/constructed, arrays beyond arr[array_length-1] are assumed not to be constructed. If this assumption is violated, memory might leak.
Data Races
Thread safety unknown!