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

ci: fix compilation with g++ (#9629)

This commit is contained in:
Louis Schmieder 2021-04-07 17:53:04 +02:00 committed by GitHub
parent 9c67a1cf62
commit fdb4f17866
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -377,12 +377,13 @@ fn (mut g Gen) sqlite3_create_table(node ast.SqlStmt, typ SqlType) {
mut fields := []string{}
outer: for field in struct_data.fields {
for field in struct_data.fields {
mut is_primary := false
mut skip := false
for attr in field.attrs {
match attr.name {
'skip' {
continue outer
skip = true
}
'primary' {
is_primary = true
@ -390,6 +391,9 @@ fn (mut g Gen) sqlite3_create_table(node ast.SqlStmt, typ SqlType) {
else {}
}
}
if skip { // cpp workaround
continue
}
mut stmt := ''
mut converted_typ := g.sql_type_from_v(typ, field.typ)
mut name := field.name