From e6737d5775ffcf3128acdc6b6f8a907c10e0fb3c Mon Sep 17 00:00:00 2001 From: ridiculousfish Date: Sat, 16 Jun 2018 11:40:59 -0700 Subject: [PATCH] Use a std::move in expand_cmdsubst Save an unnecessary allocation. --- src/expand.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/expand.cpp b/src/expand.cpp index 80a94c066..7e3476886 100644 --- a/src/expand.cpp +++ b/src/expand.cpp @@ -649,7 +649,7 @@ static bool expand_cmdsubst(const wcstring &input, std::vector *ou // sub_res, idx ), idx ); // sub_res[idx] = 0; // ?? } - sub_res = sub_res2; + sub_res = std::move(sub_res2); } // Recursively call ourselves to expand any remaining command substitutions. The result of this