mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-04-07 01:42:04 +00:00
[qfcc] Promote enums so they can be used in math
This commit is contained in:
parent
f92ab4f64b
commit
1e88fec72c
1 changed files with 4 additions and 0 deletions
|
@ -186,6 +186,10 @@ promote_exprs (const expr_t **e1, const expr_t **e2)
|
|||
//FIXME proper backing type for enum like handle
|
||||
t1 = type_default;
|
||||
t2 = type_default;
|
||||
} else if (is_math (t1) && is_enum (t2)) {
|
||||
t2 = promote_type (t1, t2);
|
||||
} else if (is_math (t2) && is_enum (t1)) {
|
||||
t1 = promote_type (t2, t1);
|
||||
} else if ((is_vector (t1) || is_quaternion (t1))
|
||||
&& (is_float (t2) || is_bool (t2))) {
|
||||
t2 = promote_type (t1, t2);
|
||||
|
|
Loading…
Reference in a new issue