Skip to content

Commit 5331d29

Browse files
committed
Merge branch 'fix-578'
2 parents 6062f9b + 004270d commit 5331d29

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/lib_json/json_reader.cpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,7 @@ Reader::Reader(const Features& features)
103103

104104
bool
105105
Reader::parse(const std::string& document, Value& root, bool collectComments) {
106-
JSONCPP_STRING documentCopy(document.data(), document.data() + document.capacity());
107-
std::swap(documentCopy, document_);
106+
document_.assign(document.begin(), document.end());
108107
const char* begin = document_.c_str();
109108
const char* end = begin + document_.length();
110109
return parse(begin, end, root, collectComments);

0 commit comments

Comments
 (0)