mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-03-24 19:23:00 +00:00
Throw away function parameter type alias info
typedef is meant to create a simple renaming of a potentially complex type, not create a new type. Keeping the parameter type alias info makes the types effectively different when it comes to overloaded function resolution, which is quite contrary to the goal. Does expose some breakage elsewhere, though.
This commit is contained in:
parent
9528c1176e
commit
69b5029de5
2 changed files with 5 additions and 1 deletions
|
@ -18,5 +18,6 @@ o isset() intrinsic for more consistent string handling.
|
|||
o arrays in entities
|
||||
o optional arguments for functions (alternative to overloading)
|
||||
vector(vector fwd, optional vector up) vectoangles = #51;
|
||||
o rewrite type system to be const-correct (hard!)
|
||||
? try to reduce memory consumption
|
||||
?? embedded nul characters in strings (why?)
|
||||
|
|
|
@ -177,7 +177,10 @@ parse_params (type_t *type, param_t *parms)
|
|||
internal_error (0, 0);
|
||||
new->t.func.num_params = -(new->t.func.num_params + 1);
|
||||
} else if (p->type) {
|
||||
new->t.func.param_types[new->t.func.num_params] = p->type;
|
||||
// FIXME this cast should not be necessary, but making the
|
||||
// type system const-correct would probably take a rewrite
|
||||
type_t *t = (type_t *) unalias_type (p->type);
|
||||
new->t.func.param_types[new->t.func.num_params] = t;
|
||||
new->t.func.num_params++;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue