Skip to content

Commit

Permalink
cgen: use more efficient array.pop()
Browse files Browse the repository at this point in the history
  • Loading branch information
medvednikov committed Oct 23, 2020
1 parent 3b3501c commit 334497f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions vlib/v/gen/cgen.v
Expand Up @@ -1047,7 +1047,7 @@ fn (mut g Gen) stmt(node ast.Stmt) {
g.writeln('// TypeDecl')
}
}
g.stmt_path_pos.delete(g.stmt_path_pos.len - 1)
g.stmt_path_pos.pop()
}

fn (mut g Gen) write_defer_stmts() {
Expand Down Expand Up @@ -4762,7 +4762,7 @@ fn (mut g Gen) or_block(var_name string, or_block ast.OrExpr, return_type table.
if g.inside_ternary == 0 && !(expr_stmt.expr is ast.IfExpr) {
g.writeln(';')
}
g.stmt_path_pos.delete(g.stmt_path_pos.len - 1)
g.stmt_path_pos.pop()
} else {
g.stmt(stmt)
}
Expand Down

0 comments on commit 334497f

Please sign in to comment.