diff options
Diffstat (limited to 'src/vec.h')
| -rw-r--r-- | src/vec.h | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -11,7 +11,7 @@ struct raw_vec_s { usize len, cap; }; -#define WAYC_RAW_VEC_INIT(size) {nullptr, size, 0, 0} +#define WAYC_RAW_VEC_INIT(size) raw_vec_s{nullptr, size, 0, 0} void wayc_raw_vec_push(raw_vec_s *vec, const u8 *at); bool wayc_raw_vec_pop(raw_vec_s *vec, u8 *out); @@ -21,7 +21,8 @@ template <typename T> struct vec_s { raw_vec_s raw; }; -#define WAYC_VEC_INIT(type) {WAYC_RAW_VEC_INIT(sizeof(type))} +#define WAYC_VEC_INIT(type) \ + vec_s<type> { WAYC_RAW_VEC_INIT(sizeof(type)) } template <typename T> static inline void wayc_vec_push(vec_s<T> *vec, const T *at) { |
