From ed26d9dd90cd67c0ee4d88e1b4da9f2e6ac963d0 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 17 Aug 2014 15:56:44 +1000 Subject: BLI_array: utility function for searching an array --- source/blender/blenlib/BLI_array.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source/blender/blenlib/BLI_array.h') diff --git a/source/blender/blenlib/BLI_array.h b/source/blender/blenlib/BLI_array.h index 0cd64987997..3a9d013f796 100644 --- a/source/blender/blenlib/BLI_array.h +++ b/source/blender/blenlib/BLI_array.h @@ -181,5 +181,8 @@ void _bli_array_wrap(void *arr, unsigned int arr_len, size_t arr_stride, int dir #define BLI_array_wrap(arr, arr_len, dir) \ _bli_array_wrap(arr, arr_len, sizeof(*(arr)), dir) +int _bli_array_findindex(const void *arr, unsigned int arr_len, size_t arr_stride, const void *p); +#define BLI_array_findindex(arr, arr_len, p) \ + _bli_array_findindex(arr, arr_len, sizeof(*(arr)), p) #endif /* __BLI_ARRAY_H__ */ -- cgit v1.2.3