1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

cgen: minor simplification in cc_type() (#9833)

This commit is contained in:
yuyi 2021-04-21 17:23:21 +08:00 committed by GitHub
parent d02822f456
commit 7b8957b25e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -696,11 +696,7 @@ fn (mut g Gen) cc_type(typ ast.Type, is_prefix_struct bool) string {
if sym.info.generic_types.len > 0 {
mut sgtyps := '_T'
for gt in sym.info.generic_types {
gts := g.table.get_type_symbol(if gt.has_flag(.generic) {
g.unwrap_generic(gt)
} else {
gt
})
gts := g.table.get_type_symbol(g.unwrap_generic(gt))
sgtyps += '_$gts.cname'
}
styp += sgtyps