aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/vector.h
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2014-04-13 18:42:41 -0700
committerChris Robinson <[email protected]>2014-04-13 18:42:41 -0700
commit0ef87227c19f71c063d9d78871663f20402b5924 (patch)
tree2c6cb9825bd4b5bd66d75e750a9521f5ed4979ac /Alc/vector.h
parentcce9609b9ec69f8d139cee139d79ec01c9e2b533 (diff)
Pass in the vector insertion point as a pointer
Diffstat (limited to 'Alc/vector.h')
-rw-r--r--Alc/vector.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/Alc/vector.h b/Alc/vector.h
index 7f3d769c..d12b8ad1 100644
--- a/Alc/vector.h
+++ b/Alc/vector.h
@@ -35,8 +35,8 @@ ALboolean vector_resize(void *ptr, size_t base_size, size_t obj_count, size_t ob
#define VECTOR_ITER_BEGIN(_x) ((_x)->Data)
#define VECTOR_ITER_END(_x) ((_x)->Data + VECTOR_SIZE((_x)))
-ALboolean vector_insert(void *ptr, size_t base_size, size_t obj_size, ptrdiff_t ins_elem, const void *datstart, const void *datend);
-#define VECTOR_INSERT(_x, _i, _s, _e) (vector_insert(&(_x), sizeof(*(_x)), sizeof((_x)->Data[0]), (_i)-VECTOR_ITER_BEGIN(_x), (_s), (_e)))
+ALboolean vector_insert(void *ptr, size_t base_size, size_t obj_size, void *ins_pos, const void *datstart, const void *datend);
+#define VECTOR_INSERT(_x, _i, _s, _e) (vector_insert(&(_x), sizeof(*(_x)), sizeof((_x)->Data[0]), (_i), (_s), (_e)))
#define VECTOR_PUSH_BACK(_x, _obj) (vector_reserve(&(_x), sizeof(*(_x)), VECTOR_SIZE(_x)+1, sizeof((_x)->Data[0]), AL_FALSE) && \
(((_x)->Data[(_x)->Size++] = (_obj)),AL_TRUE))