aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTrumeet <yuuta@yuuta.moe>2021-11-22 09:26:14 -0800
committerTrumeet <yuuta@yuuta.moe>2021-11-22 09:26:14 -0800
commit21f62a0aeb82b5f590f00b37ab31e1b4c0ae008d (patch)
tree928bafa2106f2dc7e115059f5b0320d89cb390cd
parentd8d478e4346d7f9b106d50728d840b1a171106f4 (diff)
downloadmcal-21f62a0aeb82b5f590f00b37ab31e1b4c0ae008d.tar
mcal-21f62a0aeb82b5f590f00b37ab31e1b4c0ae008d.tar.gz
mcal-21f62a0aeb82b5f590f00b37ab31e1b4c0ae008d.tar.bz2
mcal-21f62a0aeb82b5f590f00b37ab31e1b4c0ae008d.zip
fix(common): LLVM build
-rw-r--r--common.h46
1 files changed, 26 insertions, 20 deletions
diff --git a/common.h b/common.h
index c78bc50..e514860 100644
--- a/common.h
+++ b/common.h
@@ -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);