From 8ab1b98328d720dec70087f0435210cdd5c67852 Mon Sep 17 00:00:00 2001 From: Phil Jones Date: Sat, 19 Nov 2022 19:33:57 +0000 Subject: Make vector finding functions names clearer. This adds `_sorted` to the names of `string_vec_find` and `desktop_vec_find`, to make it clear that these functions require their input to already be sorted. Also fix a potential bug from not sorting the list of desktops in drun mode. --- src/desktop_vec.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/desktop_vec.h') diff --git a/src/desktop_vec.h b/src/desktop_vec.h index a731566..760db30 100644 --- a/src/desktop_vec.h +++ b/src/desktop_vec.h @@ -33,7 +33,7 @@ void desktop_vec_add( void desktop_vec_add_file(struct desktop_vec *desktop, const char *id, const char *path); void desktop_vec_sort(struct desktop_vec *restrict vec); -struct desktop_entry *desktop_vec_find(struct desktop_vec *restrict vec, const char *name); +struct desktop_entry *desktop_vec_find_sorted(struct desktop_vec *restrict vec, const char *name); struct string_vec desktop_vec_filter( const struct desktop_vec *restrict vec, const char *restrict substr, -- cgit v1.2.3