From 5ffe25fca8099e8c65e337e9366284ee28611496 Mon Sep 17 00:00:00 2001 From: Jon Siwek Date: Fri, 2 Apr 2021 11:38:25 -0700 Subject: [PATCH] Use std::move() where possible in parse.y build_local()/build_global() --- src/parse.y | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/parse.y b/src/parse.y index 4f5576e6de..4fd7980625 100644 --- a/src/parse.y +++ b/src/parse.y @@ -242,7 +242,7 @@ static void build_global(ID* id, Type* t, InitClass ic, Expr* e, auto attrs_ptr = attrs ? std::make_unique>(*attrs) : nullptr; - add_global(id_ptr, t_ptr, ic, e_ptr, std::move(attrs_ptr), dt); + add_global(id_ptr, std::move(t_ptr), ic, e_ptr, std::move(attrs_ptr), dt); if ( dt == VAR_REDEF ) zeekygen_mgr->Redef(id, ::filename, ic, std::move(e_ptr)); @@ -260,7 +260,8 @@ static StmtPtr build_local(ID* id, Type* t, InitClass ic, Expr* e, auto attrs_ptr = attrs ? std::make_unique>(*attrs) : nullptr; - auto init = add_local(id_ptr, t_ptr, ic, e_ptr, std::move(attrs_ptr), dt); + auto init = add_local(std::move(id_ptr), std::move(t_ptr), ic, + std::move(e_ptr), std::move(attrs_ptr), dt); if ( do_coverage ) script_coverage_mgr.AddStmt(init.get());