mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-30 12:40:42 +00:00
fix some method bugs
This commit is contained in:
parent
3815d4be7e
commit
2a73235d35
2 changed files with 7 additions and 3 deletions
|
@ -273,8 +273,12 @@ emit_methods (methodlist_t *_methods, const char *name, int instance)
|
|||
if (!_methods)
|
||||
return 0;
|
||||
for (count = 0, method = _methods->head; method; method = method->next)
|
||||
if (!method->instance == !instance)
|
||||
if (!method->instance == !instance) {
|
||||
if (!method->def) {
|
||||
warning (0, "method %s not implemented", method->name);
|
||||
}
|
||||
count++;
|
||||
}
|
||||
if (!count)
|
||||
return 0;
|
||||
method_list = new_struct (0);
|
||||
|
@ -289,7 +293,7 @@ emit_methods (methodlist_t *_methods, const char *name, int instance)
|
|||
methods->method_next = 0;
|
||||
methods->method_count = count;
|
||||
for (i = 0, method = _methods->head; method; method = method->next) {
|
||||
if (!method->instance != !instance)
|
||||
if (!method->instance != !instance || !method->def)
|
||||
continue;
|
||||
methods->method_list[i].method_name.sel_id = ReuseString (method->name);
|
||||
methods->method_list[i].method_name.sel_types =
|
||||
|
|
|
@ -1104,7 +1104,7 @@ methoddef
|
|||
}
|
||||
| '-' methoddecl '=' '#' const ';'
|
||||
{
|
||||
$2->instance = 0;
|
||||
$2->instance = 1;
|
||||
$2 = class_find_method (current_class, $2);
|
||||
$2->def = method_def (current_class, $2);
|
||||
|
||||
|
|
Loading…
Reference in a new issue