Commit 6fe99777 authored by Etienne Laurin's avatar Etienne Laurin

Allow pointer tokens to have non-null-terminated strings

parent 2648a732
...@@ -488,7 +488,7 @@ public: ...@@ -488,7 +488,7 @@ public:
v = &((*v)[t->index]); v = &((*v)[t->index]);
} }
else { else {
typename ValueType::MemberIterator m = v->FindMember(GenericStringRef<Ch>(t->name, t->length)); typename ValueType::MemberIterator m = v->FindMember(GenericValue<Encoding>(GenericStringRef<Ch>(t->name, t->length)));
if (m == v->MemberEnd()) { if (m == v->MemberEnd()) {
v->AddMember(ValueType(t->name, t->length, allocator).Move(), ValueType().Move(), allocator); v->AddMember(ValueType(t->name, t->length, allocator).Move(), ValueType().Move(), allocator);
v = &(--v->MemberEnd())->value; // Assumes AddMember() appends at the end v = &(--v->MemberEnd())->value; // Assumes AddMember() appends at the end
...@@ -543,7 +543,7 @@ public: ...@@ -543,7 +543,7 @@ public:
switch (v->GetType()) { switch (v->GetType()) {
case kObjectType: case kObjectType:
{ {
typename ValueType::MemberIterator m = v->FindMember(GenericStringRef<Ch>(t->name, t->length)); typename ValueType::MemberIterator m = v->FindMember(GenericValue<EncodingType>(GenericStringRef<Ch>(t->name, t->length)));
if (m == v->MemberEnd()) if (m == v->MemberEnd())
break; break;
v = &m->value; v = &m->value;
...@@ -779,7 +779,7 @@ public: ...@@ -779,7 +779,7 @@ public:
switch (v->GetType()) { switch (v->GetType()) {
case kObjectType: case kObjectType:
{ {
typename ValueType::MemberIterator m = v->FindMember(GenericStringRef<Ch>(t->name, t->length)); typename ValueType::MemberIterator m = v->FindMember(GenericValue<Encoding>(GenericStringRef<Ch>(t->name, t->length)));
if (m == v->MemberEnd()) if (m == v->MemberEnd())
return false; return false;
v = &m->value; v = &m->value;
......
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