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>2013-08-14 03:43:44 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-08-14 03:43:44 +0400
commit5ba898d86894e067960a000f3c05f03baa1d2695 (patch)
tree8046c415b0e5af2354179e269da40b39981cebc7 /source/blender/blenlib/BLI_array.h
parent91f04bebf00405223c8e0f6dcbac26a86e31f1af (diff)
utility functions to reverse and wrap arrays.
Diffstat (limited to 'source/blender/blenlib/BLI_array.h')
-rw-r--r--source/blender/blenlib/BLI_array.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/source/blender/blenlib/BLI_array.h b/source/blender/blenlib/BLI_array.h
index ef5cb8bde04..566fc95eb4f 100644
--- a/source/blender/blenlib/BLI_array.h
+++ b/source/blender/blenlib/BLI_array.h
@@ -173,4 +173,14 @@ void _bli_array_grow_func(void **arr_p, const void *arr_static,
MEM_freeN(arr); \
} (void)0
+
+void _bli_array_reverse(void *arr, unsigned int arr_len, size_t arr_stride);
+#define BLI_array_reverse(arr, arr_len) \
+ _bli_array_reverse(arr, arr_len, sizeof(*(arr)))
+
+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)
+
+
#endif /* __BLI_ARRAY_H__ */