mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-13 00:24:12 +00:00
Make class_check_ivars() use class_add_ivars() to add the ivars.
This avoids implementation ivar blocks trashing the ivar offsets in derived classes.
This commit is contained in:
parent
104c29e4da
commit
a919e5f619
1 changed files with 10 additions and 10 deletions
|
@ -928,23 +928,23 @@ void
|
||||||
class_check_ivars (class_t *class, symtab_t *ivars)
|
class_check_ivars (class_t *class, symtab_t *ivars)
|
||||||
{
|
{
|
||||||
symbol_t *civ, *iv;
|
symbol_t *civ, *iv;
|
||||||
|
int missmatch = 0;
|
||||||
|
|
||||||
if (!class->ivars != !ivars)
|
if (!class->ivars != !ivars) {
|
||||||
goto missmatch;
|
missmatch = 1;
|
||||||
if (ivars) {
|
} else if (ivars) {
|
||||||
for (civ = class->ivars->symbols, iv = ivars->symbols;
|
for (civ = class->ivars->symbols, iv = ivars->symbols;
|
||||||
civ && iv; civ = civ->next, iv = iv->next) {
|
civ && iv; civ = civ->next, iv = iv->next) {
|
||||||
if (!compare_symbols (civ, iv))
|
if (!compare_symbols (civ, iv)) {
|
||||||
goto missmatch;
|
missmatch = 1;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
class->ivars = ivars;
|
|
||||||
return;
|
|
||||||
missmatch:
|
|
||||||
//FIXME right option?
|
//FIXME right option?
|
||||||
if (options.warnings.interface_check)
|
if (missmatch && options.warnings.interface_check)
|
||||||
warning (0, "instance variable missmatch for %s", class->name);
|
warning (0, "instance variable missmatch for %s", class->name);
|
||||||
class->ivars = ivars;
|
class_add_ivars (class, ivars);
|
||||||
}
|
}
|
||||||
|
|
||||||
category_t *
|
category_t *
|
||||||
|
|
Loading…
Reference in a new issue