From 40a0692a1c9cc022c224577a3806ae9f0599695f Mon Sep 17 00:00:00 2001
From: Chris Robinson <chris.kcat@gmail.com>
Date: Fri, 21 Mar 2014 02:41:46 -0700
Subject: Use vectors for the GenModList

---
 Alc/vector.h | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

(limited to 'Alc/vector.h')

diff --git a/Alc/vector.h b/Alc/vector.h
index 51e642ee..81ba5baf 100644
--- a/Alc/vector.h
+++ b/Alc/vector.h
@@ -25,6 +25,7 @@ ALboolean vector_reserve(void *ptr, size_t orig_count, size_t base_size, size_t
 #define VECTOR_RESERVE(_x, _c) (vector_reserve(&(_x), (_x)->Max, sizeof(*(_x)), (_c), sizeof((_x)->Data[0])))
 
 #define VECTOR_SIZE(_x) ((const ALsizei)(_x)->Size)
+#define VECTOR_MAX(_x) ((const ALsizei)(_x)->Max)
 
 #define VECTOR_ITER_BEGIN(_x) ((_x)->Data)
 #define VECTOR_ITER_END(_x)   ((_x)->Data + (_x)->Size)
@@ -33,6 +34,9 @@ ALboolean vector_reserve(void *ptr, size_t orig_count, size_t base_size, size_t
 #define VECTOR_PUSH_BACK(_x, _obj) ((void)((_x)->Data[(_x)->Size++] = (_obj)))
 #define VECTOR_POP_BACK(_x) ((void)((_x)->Size--))
 
-#define VECTOR_ELEM(_x, _o) ((_x)->Data[_o])
+#define VECTOR_BACK(_x)  ((_x)->Data[(_x)->Size-1])
+#define VECTOR_FRONT(_x) ((_x)->Data[0])
+
+#define VECTOR_ELEM(_x, _o) ((_x)->Data[(_o)])
 
 #endif /* AL_VECTOR_H */
-- 
cgit v1.2.3