mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-29 23:52:22 +00:00
[qfcc] Handle more vector type tests
That new_zero_expr is coming in handy. I should clean up expr_bool.c.
This commit is contained in:
parent
719cf055a5
commit
52eaa2fee7
1 changed files with 6 additions and 6 deletions
|
@ -69,7 +69,6 @@
|
||||||
expr_t *
|
expr_t *
|
||||||
test_expr (expr_t *e)
|
test_expr (expr_t *e)
|
||||||
{
|
{
|
||||||
static float zero[4] = {0, 0, 0, 0};
|
|
||||||
expr_t *new = 0;
|
expr_t *new = 0;
|
||||||
type_t *type;
|
type_t *type;
|
||||||
|
|
||||||
|
@ -128,14 +127,15 @@ test_expr (expr_t *e)
|
||||||
}
|
}
|
||||||
return e;
|
return e;
|
||||||
}
|
}
|
||||||
new = new_float_expr (0);
|
new = expr_file_line (new_zero_expr (type), e);
|
||||||
break;
|
new = expr_file_line (binary_expr (NE, e, new), e);
|
||||||
|
return test_expr (new);
|
||||||
case ev_double:
|
case ev_double:
|
||||||
new = expr_file_line (new_double_expr (0), e);
|
new = expr_file_line (new_zero_expr (type), e);
|
||||||
new = expr_file_line (binary_expr (NE, e, new), e);
|
new = expr_file_line (binary_expr (NE, e, new), e);
|
||||||
return test_expr (new);
|
return test_expr (new);
|
||||||
case ev_vector:
|
case ev_vector:
|
||||||
new = new_vector_expr (zero);
|
new = new_zero_expr (&type_vector);
|
||||||
break;
|
break;
|
||||||
case ev_entity:
|
case ev_entity:
|
||||||
return new_alias_expr (type_default, e);
|
return new_alias_expr (type_default, e);
|
||||||
|
@ -146,7 +146,7 @@ test_expr (expr_t *e)
|
||||||
case ev_ptr:
|
case ev_ptr:
|
||||||
return new_alias_expr (type_default, e);
|
return new_alias_expr (type_default, e);
|
||||||
case ev_quaternion:
|
case ev_quaternion:
|
||||||
new = new_quaternion_expr (zero);
|
new = new_zero_expr (&type_quaternion);
|
||||||
break;
|
break;
|
||||||
case ev_invalid:
|
case ev_invalid:
|
||||||
if (is_enum (type)) {
|
if (is_enum (type)) {
|
||||||
|
|
Loading…
Reference in a new issue