mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-02-25 13:11:00 +00:00
[qfcc] Clean up make_qc_param
The code for it and make_param were nearly identical, but it turned out that just setting up the symbol correctly was all that was needed before passing the spec to make_param. This will make implementing parameter qualifiers easier (less repetition).
This commit is contained in:
parent
6f0c7eaba6
commit
4dd461d1e6
1 changed files with 3 additions and 9 deletions
|
@ -541,15 +541,9 @@ make_selector (const char *selector, const type_t *type, const char *name)
|
|||
static param_t *
|
||||
make_qc_param (specifier_t spec, symbol_t *sym)
|
||||
{
|
||||
if (spec.type_expr) {
|
||||
auto param = new_generic_param (spec.type_expr, spec.sym->name);
|
||||
return param;
|
||||
} else {
|
||||
spec = default_type (spec, spec.sym);
|
||||
sym->type = spec.type;
|
||||
auto param = new_param (0, spec.type, sym->name);
|
||||
return param;
|
||||
}
|
||||
sym->type = nullptr;
|
||||
spec.sym = sym;
|
||||
return make_param (spec);
|
||||
}
|
||||
|
||||
static param_t *
|
||||
|
|
Loading…
Reference in a new issue