Move the initial capacity definition to the header file

This commit is contained in:
Luke Benstead 2018-05-28 07:16:50 +01:00
parent a08ce4a06c
commit fef6387120
2 changed files with 2 additions and 2 deletions

View File

@ -11,8 +11,6 @@
#include "aligned_vector.h"
#define ALIGNED_VECTOR_INITIAL_CAPACITY 256u
void aligned_vector_init(AlignedVector* vector, unsigned int element_size) {
vector->size = vector->capacity = 0;
vector->element_size = element_size;

View File

@ -8,6 +8,8 @@ typedef struct {
unsigned int element_size;
} AlignedVector;
#define ALIGNED_VECTOR_INITIAL_CAPACITY 256u
void aligned_vector_init(AlignedVector* vector, unsigned int element_size);
void aligned_vector_reserve(AlignedVector* vector, unsigned int element_count);
void aligned_vector_push_back(AlignedVector* vector, const void* objs, unsigned int count);