projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8d9e76c
)
mesa/util: add util_dynarray_clear() helper
author
Samuel Pitoiset
<samuel.pitoiset@gmail.com>
Wed, 14 Jun 2017 11:55:09 +0000
(13:55 +0200)
committer
Samuel Pitoiset
<samuel.pitoiset@gmail.com>
Sun, 18 Jun 2017 12:10:32 +0000
(14:10 +0200)
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/util/u_dynarray.h
patch
|
blob
|
history
diff --git
a/src/util/u_dynarray.h
b/src/util/u_dynarray.h
index 57f96ff79c0ea7b9b7e1e8e279c2ceee568d822a..cc316323f2884e96d68c89618f07e620ac082082 100644
(file)
--- a/
src/util/u_dynarray.h
+++ b/
src/util/u_dynarray.h
@@
-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 */