refactor(storm): use 'T' to refer to template type argument instead of 'type'

This commit is contained in:
phaneron 2024-07-07 13:36:56 -04:00
parent 6c0a26cb76
commit b8e5ccb9ae

View file

@ -3,28 +3,28 @@
#include <stdint.h> #include <stdint.h>
#define STORM_TS_BASE_ARRAY(type) typedef struct TSBaseArray_##type TSBaseArray_##type; \ #define STORM_TS_BASE_ARRAY(T) typedef struct TSBaseArray_##T TSBaseArray_##T; \
struct TSBaseArray_##type { \ struct TSBaseArray_##T { \
void** vtable; \ void** vtable; \
uint32_t m_alloc; \ uint32_t m_alloc; \
uint32_t m_count; \ uint32_t m_count; \
type* m_data; \ T* m_data; \
}; };
#define STORM_TS_FIXED_ARRAY(type) typedef struct TSFixedArray_##type TSFixedArray_##type; \ #define STORM_TS_FIXED_ARRAY(T) typedef struct TSFixedArray_##T TSFixedArray_##T; \
struct TSFixedArray_##type { \ struct TSFixedArray_##T { \
void** vtable; \ void** vtable; \
uint32_t m_alloc; \ uint32_t m_alloc; \
uint32_t m_count; \ uint32_t m_count; \
type* m_data; \ T* m_data; \
}; };
#define STORM_TS_GROWABLE_ARRAY(type) typedef struct TSGrowableArray_##type TSGrowableArray_##type; \ #define STORM_TS_GROWABLE_ARRAY(T) typedef struct TSGrowableArray_##T TSGrowableArray_##T; \
struct TSGrowableArray_##type { \ struct TSGrowableArray_##T { \
void** vtable; \ void** vtable; \
uint32_t m_alloc; \ uint32_t m_alloc; \
uint32_t m_count; \ uint32_t m_count; \
type* m_data; \ T* m_data; \
uint32_t m_chunk; \ uint32_t m_chunk; \
}; };