mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-22 04:21:51 +00:00
[qfcc] Add named types to algebra subtypes
I'm uncertain about the names, but this makes it much easier to get at specific subtypes (eg, PGA.tvec as a type) rather than having to know the group mask.
This commit is contained in:
parent
d387b56f60
commit
2d7b5c18af
1 changed files with 6 additions and 0 deletions
|
@ -426,6 +426,12 @@ algebra_subtype (type_t *type, attribute_t *attr)
|
|||
}
|
||||
return algebra_mvec_type (algebra, mask);
|
||||
}
|
||||
auto symtab = algebra->mvec_sym->type->t.symtab;
|
||||
auto field = symtab_lookup (symtab, attr->name);
|
||||
if (field) {
|
||||
return field->type;
|
||||
}
|
||||
error (0, "invalid subtype %s", attr->name);
|
||||
return type;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue