mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 23:32:09 +00:00
Fix the checking for assignments between id and Class.
With Class now being struct obj_class rather than an actual class or object, checking for Class now needs to be explicit.
This commit is contained in:
parent
694b268f53
commit
ee28f3869c
1 changed files with 2 additions and 2 deletions
|
@ -715,11 +715,11 @@ type_assignable (type_t *dst, type_t *src)
|
||||||
return 1;
|
return 1;
|
||||||
// id = any class pointer
|
// id = any class pointer
|
||||||
if (dst == &type_id && src->type == ev_pointer
|
if (dst == &type_id && src->type == ev_pointer
|
||||||
&& is_class (src->t.fldptr.type))
|
&& (is_class (src->t.fldptr.type) || src == &type_Class))
|
||||||
return 1;
|
return 1;
|
||||||
// any class pointer = id
|
// any class pointer = id
|
||||||
if (src == &type_id && dst->type == ev_pointer
|
if (src == &type_id && dst->type == ev_pointer
|
||||||
&& is_class (dst->t.fldptr.type))
|
&& (is_class (dst->t.fldptr.type) || dst == &type_Class))
|
||||||
return 1;
|
return 1;
|
||||||
// pointer = array
|
// pointer = array
|
||||||
if (dst->type == ev_pointer
|
if (dst->type == ev_pointer
|
||||||
|
|
Loading…
Reference in a new issue