aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/vector.h
diff options
context:
space:
mode:
Diffstat (limited to 'Alc/vector.h')
-rw-r--r--Alc/vector.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/Alc/vector.h b/Alc/vector.h
index 9f28d0db..85230378 100644
--- a/Alc/vector.h
+++ b/Alc/vector.h
@@ -7,21 +7,21 @@
/* "Base" vector type, designed to alias with the actual vector types. */
typedef struct vector__s {
- ALsizei Capacity;
- ALsizei Size;
+ size_t Capacity;
+ size_t Size;
} *vector_;
#define TYPEDEF_VECTOR(T, N) typedef struct { \
- ALsizei Capacity; \
- ALsizei Size; \
+ size_t Capacity; \
+ size_t Size; \
T Data[]; \
} _##N; \
typedef _##N* N; \
typedef const _##N* const_##N;
#define VECTOR(T) struct { \
- ALsizei Capacity; \
- ALsizei Size; \
+ size_t Capacity; \
+ size_t Size; \
T Data[]; \
}*
@@ -30,10 +30,10 @@ typedef const _##N* const_##N;
#define VECTOR_DEINIT(_x) do { free((_x)); (_x) = NULL; } while(0)
/* Helper to increase a vector's reserve. Do not call directly. */
-ALboolean vector_reserve(char *ptr, size_t base_size, size_t obj_size, ALsizei obj_count, ALboolean exact);
+ALboolean vector_reserve(char *ptr, size_t base_size, size_t obj_size, size_t obj_count, ALboolean exact);
#define VECTOR_RESERVE(_x, _c) (vector_reserve((char*)&(_x), sizeof(*(_x)), sizeof((_x)->Data[0]), (_c), AL_TRUE))
-ALboolean vector_resize(char *ptr, size_t base_size, size_t obj_size, ALsizei obj_count);
+ALboolean vector_resize(char *ptr, size_t base_size, size_t obj_size, size_t obj_count);
#define VECTOR_RESIZE(_x, _c) (vector_resize((char*)&(_x), sizeof(*(_x)), sizeof((_x)->Data[0]), (_c)))
#define VECTOR_CAPACITY(_x) ((_x) ? (_x)->Capacity : 0)