diff options
author | Trumeet <yuuta@yuuta.moe> | 2021-11-22 09:26:14 -0800 |
---|---|---|
committer | Trumeet <yuuta@yuuta.moe> | 2021-11-22 09:26:14 -0800 |
commit | 21f62a0aeb82b5f590f00b37ab31e1b4c0ae008d (patch) | |
tree | 928bafa2106f2dc7e115059f5b0320d89cb390cd | |
parent | d8d478e4346d7f9b106d50728d840b1a171106f4 (diff) | |
download | mcal-21f62a0aeb82b5f590f00b37ab31e1b4c0ae008d.tar mcal-21f62a0aeb82b5f590f00b37ab31e1b4c0ae008d.tar.gz mcal-21f62a0aeb82b5f590f00b37ab31e1b4c0ae008d.tar.bz2 mcal-21f62a0aeb82b5f590f00b37ab31e1b4c0ae008d.zip |
fix(common): LLVM build
-rw-r--r-- | common.h | 46 |
1 files changed, 26 insertions, 20 deletions
@@ -40,33 +40,39 @@ static inline double *val_get_index(struct val *val, int index) switch (val->type) { case VEC3D: - struct vec3d *d_v3d = (struct vec3d *)val; - switch (index) { - case 0: return &d_v3d->x; - case 1: return &d_v3d->y; - case 2: return &d_v3d->z; - default: assert(0); + struct vec3d *d_v3d = (struct vec3d *)val; + switch (index) + { + case 0: return &d_v3d->x; + case 1: return &d_v3d->y; + case 2: return &d_v3d->z; + default: assert(0); + } } case BOX: - struct box *v_box = (struct box *)val; - switch (index) { - case 0: return &v_box->min_x; - case 1: return &v_box->min_y; - case 2: return &v_box->min_z; - case 3: return &v_box->max_x; - case 4: return &v_box->max_y; - case 5: return &v_box->max_z; - default: assert(0); + struct box *v_box = (struct box *)val; + switch (index) + { + case 0: return &v_box->min_x; + case 1: return &v_box->min_y; + case 2: return &v_box->min_z; + case 3: return &v_box->max_x; + case 4: return &v_box->max_y; + case 5: return &v_box->max_z; + default: assert(0); + } } case ENTITY_DIMEN: - struct entity_dimen *v_dimen = (struct entity_dimen *)val; - switch (index) { - case 0: return &v_dimen->width; - case 1: return &v_dimen->height; - default: assert(0); + struct entity_dimen *v_dimen = (struct entity_dimen *)val; + switch (index) + { + case 0: return &v_dimen->width; + case 1: return &v_dimen->height; + default: assert(0); + } } default: assert(0); |