mesa/util: add util_dynarray_clear() helper
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
This commit is contained in:
@@ -68,6 +68,12 @@ util_dynarray_fini(struct util_dynarray *buf)
|
||||
}
|
||||
}
|
||||
|
||||
static inline void
|
||||
util_dynarray_clear(struct util_dynarray *buf)
|
||||
{
|
||||
buf->size = 0;
|
||||
}
|
||||
|
||||
#define DYN_ARRAY_INITIAL_SIZE 64
|
||||
|
||||
/* use util_dynarray_trim to reduce the allocated storage */
|
||||
|
||||
Reference in New Issue
Block a user