[vkgen] Clean up an unnecessary function redirect

I think it was mostly a holdover from early development, but it
certainly makes sense to tuck the functionality away in Struct.
This commit is contained in:
Bill Currie 2021-12-04 09:18:57 +09:00
parent c402275112
commit a522464fc1
3 changed files with 5 additions and 10 deletions

View file

@ -97,12 +97,6 @@ void print_type (qfot_type_t *type)
}
}
void struct_func (qfot_var_t *var)
{
Type *type = [Type findType:var.type];
[type addToQueue];
}
void
scan_types (void)
{
@ -208,7 +202,7 @@ main(int argc, string *argv)
if ([[parse getObjectForKey:[obj name]] string] == "skip") {
continue;
}
[obj forEachFieldCall:struct_func];
[obj queueFieldTypes];
}
[output_types addObject:obj];
}

View file

@ -12,7 +12,7 @@
{
string outname;
}
-(void) forEachFieldCall: (varfunc) func;
-(void) queueFieldTypes;
-(qfot_var_t *)findField:(string) fieldName;
-(void) writeTable;
-(void) writeSymtabInit;

View file

@ -27,12 +27,13 @@
}
}
-(void) forEachFieldCall: (varfunc) func
-(void) queueFieldTypes
{
qfot_struct_t *strct =&type.strct;
for (int i = 0; i < strct.num_fields; i++) {
func (&strct.fields[i]);
Type *type = [Type findType:var.type];
[type addToQueue];
}
}