mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-06-04 10:30:52 +00:00
[qfcc] Add an @construct type function
I decided to not mess with actual casts. In retrospect, this is probably for the best as it avoids any bit-cast conflicts, but should allow for block initializers with a few tweaks. `@construct (type, args...)` in Ruamoko follows the same path as `type(args...)` in glsl.
This commit is contained in:
parent
6840a208b9
commit
36c0b45bab
6 changed files with 19 additions and 14 deletions
|
@ -287,7 +287,7 @@ math_constructor (const type_t *type, const expr_t *params, const expr_t *e)
|
|||
const expr_t *
|
||||
constructor_expr (const expr_t *e, const expr_t *params)
|
||||
{
|
||||
auto type = e->symbol->type;
|
||||
auto type = e->typ.type;
|
||||
if (is_algebra (type)) {
|
||||
return error (e, "algebra not implemented");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue