From 6a035d915f2b1091dd9e0b2921d576f1bd14506c Mon Sep 17 00:00:00 2001 From: John Bartholomew Date: Fri, 13 Mar 2026 12:16:04 +0000 Subject: [PATCH] remove unnecessary std::move when constructing RapidYamlError From a compile warning: jsonnet/core/vm.cpp:3484:30: warning: moving a temporary object prevents copy elision [-Wpessimizing-move] 3484 | throw RapidYamlError(std::move(msg.str())); | ^ jsonnet/core/vm.cpp:3484:30: note: remove std::move call here 3484 | throw RapidYamlError(std::move(msg.str())); --- core/vm.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/vm.cpp b/core/vm.cpp index 18788a05..0f4ec2a3 100644 --- a/core/vm.cpp +++ b/core/vm.cpp @@ -3484,7 +3484,7 @@ class Interpreter { msg << loc.offset << ":"; } msg << " " << std::string_view(inner_msg, length); - throw RapidYamlError(std::move(msg.str())); + throw RapidYamlError(msg.str()); } };