From 17c14e73a9588536dc613fbb523cedcd5964c33f Mon Sep 17 00:00:00 2001 From: Christopher Dunn Date: Fri, 15 Sep 2017 18:55:50 -0500 Subject: [PATCH] Use move ctor in append() --- src/lib_json/json_value.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib_json/json_value.cpp b/src/lib_json/json_value.cpp index 2a53138..6432b75 100644 --- a/src/lib_json/json_value.cpp +++ b/src/lib_json/json_value.cpp @@ -1148,7 +1148,7 @@ Value const& Value::operator[](CppTL::ConstString const& key) const Value& Value::append(const Value& value) { return (*this)[size()] = value; } #if JSON_HAS_RVALUE_REFERENCES - Value& Value::append(Value&& value) { return (*this)[size()] = value; } + Value& Value::append(Value&& value) { return (*this)[size()] = std::move(value); } #endif Value Value::get(char const* key, char const* cend, Value const& defaultValue) const