From c9f6b3463f8f32ea04fe91de30435e6ca65ad5cc Mon Sep 17 00:00:00 2001 From: Tim Wojtulewicz Date: Fri, 14 Jul 2023 16:43:06 -0700 Subject: [PATCH] CPP code-gen: Use std::move for constructor arguments --- src/script_opt/CPP/DeclFunc.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/script_opt/CPP/DeclFunc.cc b/src/script_opt/CPP/DeclFunc.cc index 7a580eb30b..671bf73625 100644 --- a/src/script_opt/CPP/DeclFunc.cc +++ b/src/script_opt/CPP/DeclFunc.cc @@ -133,7 +133,7 @@ void CPPCompile::DeclareSubclass(const FuncTypePtr& ft, const ProfileFunc* pf, c auto tn = FullTypeName(id->GetType()); addl_args = addl_args + ", " + tn + " _" + name; - inits = inits + ", " + name + "(_" + name + ")"; + inits = inits + ", " + name + "(std::move(_" + name + "))"; } }