cgen: remove the skip_struct_init list
parent
7c14b44705
commit
d9e1fdbb4c
|
@ -3445,17 +3445,9 @@ fn (mut g Gen) go_back_out(n int) {
|
||||||
g.out.go_back(n)
|
g.out.go_back(n)
|
||||||
}
|
}
|
||||||
|
|
||||||
const (
|
|
||||||
skip_struct_init = ['strconv__ftoa__Uf32', 'strconv__ftoa__Uf64', 'struct stat', 'struct addrinfo']
|
|
||||||
)
|
|
||||||
|
|
||||||
fn (mut g Gen) struct_init(struct_init ast.StructInit) {
|
fn (mut g Gen) struct_init(struct_init ast.StructInit) {
|
||||||
styp := g.typ(struct_init.typ)
|
styp := g.typ(struct_init.typ)
|
||||||
mut shared_styp := '' // only needed for shared &St{...
|
mut shared_styp := '' // only needed for shared &St{...
|
||||||
if styp in skip_struct_init {
|
|
||||||
g.go_back_out(3)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
sym := g.table.get_final_type_symbol(struct_init.typ)
|
sym := g.table.get_final_type_symbol(struct_init.typ)
|
||||||
is_amp := g.is_amp
|
is_amp := g.is_amp
|
||||||
is_multiline := struct_init.fields.len > 5
|
is_multiline := struct_init.fields.len > 5
|
||||||
|
|
Loading…
Reference in New Issue