Optimisation in aligned_vector_extend

This commit is contained in:
Luke Benstead 2021-04-19 21:29:19 +01:00
parent 38c7967ae2
commit b6a5ac6ce6

View File

@ -106,9 +106,7 @@ void* aligned_vector_resize(AlignedVector* vector, const unsigned int element_co
}
void* aligned_vector_extend(AlignedVector* vector, const unsigned int additional_count) {
const unsigned int current = vector->size;
aligned_vector_resize(vector, vector->size + additional_count);
return aligned_vector_at(vector, current);
return aligned_vector_resize(vector, vector->size + additional_count);
}
void aligned_vector_shrink_to_fit(AlignedVector* vector) {