Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2021-07-09 06:33:36 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-07-09 06:35:54 +0300
commit7592a5097c8b997b308f5414434bca8e66376af1 (patch)
tree129b78c2943eea24421d2a87c7700f8bace71c0b /source/blender/blenlib/BLI_array_utils.h
parentab70133db0ba3b92d0f10837e5c615a6460910ef (diff)
BLI_array: add BLI_array_deduplicate_ordered utility & tests
Diffstat (limited to 'source/blender/blenlib/BLI_array_utils.h')
-rw-r--r--source/blender/blenlib/BLI_array_utils.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/blenlib/BLI_array_utils.h b/source/blender/blenlib/BLI_array_utils.h
index 2847bc960ad..dc85d619e91 100644
--- a/source/blender/blenlib/BLI_array_utils.h
+++ b/source/blender/blenlib/BLI_array_utils.h
@@ -44,6 +44,10 @@ void _bli_array_permute(void *arr,
#define BLI_array_permute_ex(arr, arr_len, order, arr_temp) \
_bli_array_permute(arr, arr_len, sizeof(*(arr)), order, arr_temp)
+unsigned int _bli_array_deduplicate_ordered(void *arr, unsigned int arr_len, size_t arr_stride);
+#define BLI_array_deduplicate_ordered(arr, arr_len) \
+ _bli_array_deduplicate_ordered(arr, arr_len, sizeof(*(arr)))
+
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)