mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 06:48:06 +02:00
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:
parent
8d9e76ce1f
commit
db73595018
1 changed files with 6 additions and 0 deletions
|
|
@ -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 */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue