From 61842085989cf4123619d6007fd5412c5fa78dc9 Mon Sep 17 00:00:00 2001 From: Luke Benstead Date: Sat, 18 Sep 2021 17:40:10 +0100 Subject: [PATCH] Don't include platform.h from aligned_vector.h --- containers/aligned_vector.h | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/containers/aligned_vector.h b/containers/aligned_vector.h index 14e6ac8..cf89ffe 100644 --- a/containers/aligned_vector.h +++ b/containers/aligned_vector.h @@ -3,7 +3,6 @@ #include #include #include -#include "../GL/platform.h" #ifdef __cplusplus extern "C" { @@ -18,6 +17,13 @@ static inline void* memalign(size_t alignment, size_t size) { #include #endif +#ifdef __DREAMCAST__ +#include +#define AV_MEMCPY4 memcpy4 +#else +#define AV_MEMCPY4 memcpy +#endif + typedef struct { unsigned int size; unsigned int capacity; @@ -58,7 +64,7 @@ AV_FORCE_INLINE void* aligned_vector_reserve(AlignedVector* vector, unsigned int assert(vector->data); if(original_data) { - FASTCPY(vector->data, original_data, original_byte_size); + AV_MEMCPY4(vector->data, original_data, original_byte_size); free(original_data); } @@ -106,7 +112,7 @@ AV_FORCE_INLINE void* aligned_vector_push_back(AlignedVector* vector, const void unsigned char* dest = vector->data + (vector->element_size * initial_size); /* Copy the objects in */ - FASTCPY(dest, objs, vector->element_size * count); + AV_MEMCPY4(dest, objs, vector->element_size * count); return dest; }