From 437c9fefb846d46b23d281ae2575b426945e2609 Mon Sep 17 00:00:00 2001 From: Tanay Manerikar Date: Sun, 18 Aug 2024 21:42:24 +0530 Subject: [PATCH] Removed unnecessary stmt vec. --- src/lpython/semantics/python_ast_to_asr.cpp | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/lpython/semantics/python_ast_to_asr.cpp b/src/lpython/semantics/python_ast_to_asr.cpp index 70c1aab7e0..cbdd1c197d 100644 --- a/src/lpython/semantics/python_ast_to_asr.cpp +++ b/src/lpython/semantics/python_ast_to_asr.cpp @@ -5251,21 +5251,16 @@ class BodyVisitor : public CommonVisitor { current_scope = f->m_symtab; Vec body_asr; body_asr.reserve(al, x.n_body); - Vec new_body_asr; - new_body_asr.reserve(al,1); if ( super_call_stmt ) { - new_body_asr.push_back(al, super_call_stmt); + body_asr.push_back(al, super_call_stmt); } Vec rts; rts.reserve(al, 4); dependencies.clear(al); transform_stmts(body_asr, body.n, body.p); - for (size_t i=0; im_body = new_body_asr.p; - f->n_body = new_body_asr.size(); + f->m_body = body_asr.p; + f->n_body = body_asr.size(); ASR::FunctionType_t* func_type = ASR::down_cast( f->m_function_signature); func_type->m_restrictions = rts.p;