Skip to content

Commit 334497f

Browse files
committed
cgen: use more efficient array.pop()
1 parent 3b3501c commit 334497f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

vlib/v/gen/cgen.v

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1047,7 +1047,7 @@ fn (mut g Gen) stmt(node ast.Stmt) {
10471047
g.writeln('// TypeDecl')
10481048
}
10491049
}
1050-
g.stmt_path_pos.delete(g.stmt_path_pos.len - 1)
1050+
g.stmt_path_pos.pop()
10511051
}
10521052

10531053
fn (mut g Gen) write_defer_stmts() {
@@ -4762,7 +4762,7 @@ fn (mut g Gen) or_block(var_name string, or_block ast.OrExpr, return_type table.
47624762
if g.inside_ternary == 0 && !(expr_stmt.expr is ast.IfExpr) {
47634763
g.writeln(';')
47644764
}
4765-
g.stmt_path_pos.delete(g.stmt_path_pos.len - 1)
4765+
g.stmt_path_pos.pop()
47664766
} else {
47674767
g.stmt(stmt)
47684768
}

0 commit comments

Comments
 (0)