Unverified Commit d67a69a9 authored by Milo Yip's avatar Milo Yip Committed by GitHub

Merge pull request #1490 from MalcolmTyrrell/fixCompileErrorInPointerH

Fix vs2017 compile error C2105: '--' needs l-value
parents 57772914 c840a7ae
......@@ -491,7 +491,8 @@ public:
typename ValueType::MemberIterator m = v->FindMember(GenericValue<EncodingType>(GenericStringRef<Ch>(t->name, t->length)));
if (m == v->MemberEnd()) {
v->AddMember(ValueType(t->name, t->length, allocator).Move(), ValueType().Move(), allocator);
v = &(--v->MemberEnd())->value; // Assumes AddMember() appends at the end
m = v->MemberEnd();
v = &(--m)->value; // Assumes AddMember() appends at the end
exist = false;
}
else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment