From 334497fdc0c5c1f255569312ec51ea915f155752 Mon Sep 17 00:00:00 2001 From: Alexander Medvednikov Date: Fri, 23 Oct 2020 22:52:50 +0200 Subject: [PATCH] cgen: use more efficient array.pop() --- vlib/v/gen/cgen.v | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vlib/v/gen/cgen.v b/vlib/v/gen/cgen.v index fb38c09910..0537f24ee7 100644 --- a/vlib/v/gen/cgen.v +++ b/vlib/v/gen/cgen.v @@ -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() { @@ -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) }