summaryrefslogtreecommitdiff
path: root/darray.h
diff options
context:
space:
mode:
authorPeter Zhu <peter@peterzhu.ca>2026-02-05 20:06:42 -0500
committerPeter Zhu <peter@peterzhu.ca>2026-02-07 11:12:04 -0500
commit1f0fc3da7090977110d8d64d2ad69bfa3f5cc584 (patch)
tree088db3da7ab3936d6dcb9e50b3e6e20c859abe35 /darray.h
parentc9cb17fab28419350ca854bec69c74530b20076c (diff)
Remove dead rb_darray_swap_remove
Diffstat (limited to 'darray.h')
-rw-r--r--darray.h14
1 files changed, 0 insertions, 14 deletions
diff --git a/darray.h b/darray.h
index 10fd5e4ccc..2b876c9f1e 100644
--- a/darray.h
+++ b/darray.h
@@ -73,20 +73,6 @@
(*(ptr_to_ary))->meta.size++; \
} while (0)
-/* Removes the element at idx and replaces it with the last element.
- * ptr_to_ary and idx is evaluated multiple times.
- * Warning: not bounds checked.
- *
- * void rb_darray_swap_remove(rb_darray(T) *ptr_to_ary, size_t idx);
- */
-#define rb_darray_swap_remove(ptr_to_ary, idx) do { \
- size_t _darray_size = rb_darray_size(*(ptr_to_ary)); \
- if ((idx) != _darray_size - 1) { \
- (*(ptr_to_ary))->data[idx] = (*(ptr_to_ary))->data[_darray_size - 1]; \
- } \
- (*(ptr_to_ary))->meta.size--; \
-} while (0)
-
// Iterate over items of the array in a for loop
//
#define rb_darray_foreach(ary, idx_name, elem_ptr_var) \