mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-10-13 19:08:11 +00:00
[common] vector: implement a clear operation
This commit is contained in:
@@ -101,3 +101,8 @@ void * vector_ptrTo(Vector * vector, size_t index)
|
||||
DEBUG_ASSERT(index < vector->size && "Out of bounds access");
|
||||
return (char *)vector->data + index * vector->itemSize;
|
||||
}
|
||||
|
||||
void vector_clear(Vector * vector)
|
||||
{
|
||||
vector->size = 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user