From 133ebfe96385a0e94ab8b029a31ca0cd7a23c50a Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sat, 1 May 2021 19:56:59 +0100 Subject: Pass new values more efficiently --- lib/jsonParse-persistence.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/jsonParse-persistence.cpp') diff --git a/lib/jsonParse-persistence.cpp b/lib/jsonParse-persistence.cpp index 5b3314e..7c00773 100644 --- a/lib/jsonParse-persistence.cpp +++ b/lib/jsonParse-persistence.cpp @@ -44,7 +44,7 @@ namespace Persistence { void JsonParsePersistence::pushText(std::string && value) { - pushValue(value); + pushValue(std::move(value)); } void @@ -72,7 +72,7 @@ namespace Persistence { JsonParsePersistence::pushValue(T && value) { current()->beforeValue(stk); - current()->setValue(value); + current()->setValue(std::forward(value)); stk.pop(); } -- cgit v1.2.3