mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-03-21 18:01:15 +00:00
[qfcc] Remove "impossible" code
It is not possible to adorn Class with protocols, so no need to check for them when checking if a type is a class.
This commit is contained in:
parent
e1140d476a
commit
fb33a7f2a7
2 changed files with 1 additions and 10 deletions
|
@ -116,7 +116,7 @@ struct symbol_s;
|
|||
|
||||
int obj_is_id (const struct type_s *type) __attribute__((pure));
|
||||
int obj_is_class (const struct type_s *type) __attribute__((pure));
|
||||
int obj_is_Class (const struct type_s *type) __attribute__((pure));
|
||||
int obj_is_Class (const struct type_s *type) __attribute__((const));
|
||||
int obj_is_classptr (const struct type_s *type) __attribute__((pure));
|
||||
int obj_types_assignable (const struct type_s *dst, const struct type_s *src);
|
||||
|
||||
|
|
|
@ -345,15 +345,6 @@ obj_is_Class (const type_t *type)
|
|||
{
|
||||
if (type == &type_Class)
|
||||
return 1;
|
||||
// type may be a qualified Class, in which case it will be a pointer to
|
||||
// a qualified obj_class struct
|
||||
if (type->type != ev_pointer)
|
||||
return 0;
|
||||
if (!is_struct (type->t.fldptr.type))
|
||||
return 0;
|
||||
// if the the symtabs match, then type is Class in disguise
|
||||
if (type->t.fldptr.type->t.symtab == type_obj_class.t.symtab)
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue