diff options
author | Chris Robinson <[email protected]> | 2014-09-30 21:47:22 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2014-09-30 21:47:22 -0700 |
commit | d82d6c701ddb1c392606929695d6b96cfa70e3c1 (patch) | |
tree | cc2f9da6a82aed4dd5b3a3beb0d2ead776c66d8b /Alc/vector.h | |
parent | 4d36ef65b2ec1cd3122bf9ee615df452f003d014 (diff) |
Use size_t for the vector size and capacity
Diffstat (limited to 'Alc/vector.h')
-rw-r--r-- | Alc/vector.h | 16 |
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) |