aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/vector.h
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2016-05-21 03:27:51 -0700
committerChris Robinson <[email protected]>2016-05-21 03:27:51 -0700
commit2e7ec3979aec71f11c45b737b77d58978cbee7e2 (patch)
treec931d2f9b55cc6803a00896f92793a58de8fdc11 /Alc/vector.h
parent7bf64eaee0788b7eb64c7410384a9ee66f75c4ce (diff)
Avoid using realloc in a number of places
Diffstat (limited to 'Alc/vector.h')
-rw-r--r--Alc/vector.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/Alc/vector.h b/Alc/vector.h
index cb64b5a9..5a0219c0 100644
--- a/Alc/vector.h
+++ b/Alc/vector.h
@@ -5,6 +5,8 @@
#include <AL/al.h>
+#include "almalloc.h"
+
/* "Base" vector type, designed to alias with the actual vector types. */
typedef struct vector__s {
size_t Capacity;
@@ -27,7 +29,7 @@ typedef const _##N* const_##N;
#define VECTOR_INIT(_x) do { (_x) = NULL; } while(0)
#define VECTOR_INIT_STATIC() NULL
-#define VECTOR_DEINIT(_x) do { free((_x)); (_x) = NULL; } while(0)
+#define VECTOR_DEINIT(_x) do { al_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, size_t obj_count, ALboolean exact);