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>2016-05-02 11:01:00 +0300
committerCampbell Barton <ideasman42@gmail.com>2016-05-02 11:49:22 +0300
commit915e9eeff12eb0f0e0fc01927fecc876a0cdfdbe (patch)
treefec10c10aadeaaf1300fe00aa84171e9d9325b8c /source/blender/blenlib/BLI_array_utils.h
parentc1ca667d4a9f42cda9dd7486f9826db07baacd2a (diff)
BLI_array_utils: helper for stepping over contiguous ranges
Diffstat (limited to 'source/blender/blenlib/BLI_array_utils.h')
-rw-r--r--source/blender/blenlib/BLI_array_utils.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/source/blender/blenlib/BLI_array_utils.h b/source/blender/blenlib/BLI_array_utils.h
index c5359d56f9c..5ef8421c003 100644
--- a/source/blender/blenlib/BLI_array_utils.h
+++ b/source/blender/blenlib/BLI_array_utils.h
@@ -64,4 +64,16 @@ void _bli_array_binary_or(
CHECK_TYPE_PAIR_INLINE(*(arr), *(arr_b)), \
_bli_array_binary_or(arr, arr_a, arr_b, arr_len, sizeof(*(arr))))
+bool _bli_array_iter_span(
+ const void *arr,
+ unsigned int arr_len, size_t arr_stride,
+ bool use_wrap, bool use_delimit_bounds,
+ bool (*test_fn)(const void *arr_item, void *user_data), void *user_data,
+ unsigned int span_step[2], unsigned int *r_span_len);
+#define BLI_array_iter_span(arr, arr_len, use_wrap, use_delimit_bounds, test_fn, user_data, \
+ span_step, r_span_len) \
+ _bli_array_iter_span( \
+ arr, arr_len, sizeof(*(arr)), use_wrap, use_delimit_bounds, test_fn, user_data, \
+ span_step, r_span_len)
+
#endif /* __BLI_ARRAY_UTILS_H__ */