mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-05-31 00:30:57 +00:00
[qfcc] Use maximum cost for non-matching param counts
I had missed this so such cases wound up with a cost of 0 resulting in bogusly ambiguous function calls (or possibly worse).
This commit is contained in:
parent
17ae2b592c
commit
9ba335f91e
1 changed files with 1 additions and 0 deletions
|
@ -677,6 +677,7 @@ find_generic_function (genfunc_t **genfuncs, const expr_t *fexpr,
|
||||||
for (int j = 0; j < num_funcs; j++) {
|
for (int j = 0; j < num_funcs; j++) {
|
||||||
auto g = genfuncs[j];
|
auto g = genfuncs[j];
|
||||||
if (g->num_params != num_params) {
|
if (g->num_params != num_params) {
|
||||||
|
costs[j] = ~0u;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
const type_t *types[g->num_types] = {};
|
const type_t *types[g->num_types] = {};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue