mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-04-15 05:41:59 +00:00
[qfcc] Handle reference params/args for overloaded functions
Reference vs value parameters do not resolve overloaded functions.
This commit is contained in:
parent
663aeb16fd
commit
744c3ff1d6
1 changed files with 9 additions and 2 deletions
|
@ -926,8 +926,15 @@ find_function (const expr_t *fexpr, const expr_t *params)
|
|||
parm_count = ~parm_count;
|
||||
int j;
|
||||
for (j = 0; j < parm_count; j++) {
|
||||
if (!type_assignable (f->type->func.param_types[j],
|
||||
call_type.func.param_types[j])) {
|
||||
auto fptype = f->type->func.param_types[j];
|
||||
auto cptype = call_type.func.param_types[j];
|
||||
if (is_reference (fptype)) {
|
||||
fptype = dereference_type (fptype);
|
||||
}
|
||||
if (is_reference (cptype)) {
|
||||
cptype = dereference_type (cptype);
|
||||
}
|
||||
if (!type_assignable (fptype, cptype)) {
|
||||
funcs[i] = 0;
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue