summaryrefslogtreecommitdiff
path: root/lib/vector.h
diff options
context:
space:
mode:
authorQuentin Young <qlyoung@cumulusnetworks.com>2018-05-29 21:38:18 +0000
committerQuentin Young <qlyoung@cumulusnetworks.com>2018-06-06 16:16:12 +0000
commitf428cb8a3a9cef3a1f68be6434f8db6fa9b693ef (patch)
treea9c9d4c739f9f9e8aa427e3e252c5a892513382c /lib/vector.h
parent5d806ec6e0bce5f1cd32b0d5386c1ad97c31c1f8 (diff)
lib: add vector_compact(), use after str splits
* Add function to move all data to the start of a vector by shifting over contiguous empty slots * Use this function to remove empty slots leftover after frrstr_filter_vec Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Diffstat (limited to 'lib/vector.h')
-rw-r--r--lib/vector.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/vector.h b/lib/vector.h
index 21732a300e..97e15da040 100644
--- a/lib/vector.h
+++ b/lib/vector.h
@@ -53,6 +53,7 @@ extern int vector_set_index(vector v, unsigned int i, void *val);
extern void vector_unset(vector v, unsigned int i);
extern void vector_unset_value(vector v, void *val);
extern void vector_remove(vector v, unsigned int ix);
+extern void vector_compact(vector v);
extern unsigned int vector_count(vector v);
extern void vector_free(vector v);