We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bc849a1 commit a2dcc8bCopy full SHA for a2dcc8b
1 file changed
darray.h
@@ -73,20 +73,6 @@
73
(*(ptr_to_ary))->meta.size++; \
74
} while (0)
75
76
-/* Removes the element at idx and replaces it with the last element.
77
- * ptr_to_ary and idx is evaluated multiple times.
78
- * Warning: not bounds checked.
79
- *
80
- * void rb_darray_swap_remove(rb_darray(T) *ptr_to_ary, size_t idx);
81
- */
82
-#define rb_darray_swap_remove(ptr_to_ary, idx) do { \
83
- size_t _darray_size = rb_darray_size(*(ptr_to_ary)); \
84
- if ((idx) != _darray_size - 1) { \
85
- (*(ptr_to_ary))->data[idx] = (*(ptr_to_ary))->data[_darray_size - 1]; \
86
- } \
87
- (*(ptr_to_ary))->meta.size--; \
88
-} while (0)
89
-
90
// Iterate over items of the array in a for loop
91
//
92
#define rb_darray_foreach(ary, idx_name, elem_ptr_var) \
0 commit comments