From a6ed4ae3088fee654178dd063c77db108de890cd Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Thu, 1 Jul 2021 09:57:30 +0200 Subject: util/array: add array_remove_at --- include/util/array.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include/util') diff --git a/include/util/array.h b/include/util/array.h index 32bc059f..9612e7db 100644 --- a/include/util/array.h +++ b/include/util/array.h @@ -4,6 +4,7 @@ #include #include #include +#include size_t push_zeroes_to_end(uint32_t arr[], size_t n); @@ -21,4 +22,9 @@ bool set_add(uint32_t values[], size_t *len, size_t cap, uint32_t target); */ bool set_remove(uint32_t values[], size_t *len, size_t cap, uint32_t target); +/** + * Remove a chunk of memory of the specified size at the specified offset. + */ +void array_remove_at(struct wl_array *arr, size_t offset, size_t size); + #endif -- cgit v1.2.3