Skip to content

Commit 17c14e7

Browse files
committedSep 15, 2017
Use move ctor in append()
1 parent 21e133c commit 17c14e7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎src/lib_json/json_value.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1148,7 +1148,7 @@ Value const& Value::operator[](CppTL::ConstString const& key) const
11481148
Value& Value::append(const Value& value) { return (*this)[size()] = value; }
11491149

11501150
#if JSON_HAS_RVALUE_REFERENCES
1151-
Value& Value::append(Value&& value) { return (*this)[size()] = value; }
1151+
Value& Value::append(Value&& value) { return (*this)[size()] = std::move(value); }
11521152
#endif
11531153

11541154
Value Value::get(char const* key, char const* cend, Value const& defaultValue) const

0 commit comments

Comments
 (0)
Please sign in to comment.