diff options
author | Chris Robinson <[email protected]> | 2014-08-10 09:12:08 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2014-08-10 09:12:08 -0700 |
commit | 936a79da7dccfe819b616c044c9d4930ef331d9e (patch) | |
tree | 9499d8722765f28da6d736fd33b5ad252f10c936 /Alc/vector.h | |
parent | 94013216b62ff6f78c46fb67bf6d7b9dcbe1170f (diff) |
Give NULL for null-vector iterators
Diffstat (limited to 'Alc/vector.h')
-rw-r--r-- | Alc/vector.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Alc/vector.h b/Alc/vector.h index b04b65eb..9cac216e 100644 --- a/Alc/vector.h +++ b/Alc/vector.h @@ -39,8 +39,8 @@ ALboolean vector_resize(char *ptr, size_t base_size, size_t obj_count, size_t ob #define VECTOR_CAPACITY(_x) ((_x) ? (_x)->Capacity : 0) #define VECTOR_SIZE(_x) ((_x) ? (_x)->Size : 0) -#define VECTOR_ITER_BEGIN(_x) ((_x)->Data + 0) -#define VECTOR_ITER_END(_x) ((_x)->Data + VECTOR_SIZE(_x)) +#define VECTOR_ITER_BEGIN(_x) ((_x) ? (_x)->Data + 0 : NULL) +#define VECTOR_ITER_END(_x) ((_x) ? (_x)->Data + (_x)->Size : NULL) ALboolean vector_insert(char *ptr, size_t base_size, size_t obj_size, void *ins_pos, const void *datstart, const void *datend); #ifdef __GNUC__ |