ext/rj_schema/rapidjson/include/rapidjson/schema.h in rj_schema-0.1.3 vs ext/rj_schema/rapidjson/include/rapidjson/schema.h in rj_schema-0.1.4

- old
+ new

@@ -1671,10 +1671,11 @@ PointerType pointer(&s[i], len - i, allocator_); if (pointer.IsValid()) { if (const SchemaType* sc = remoteDocument->GetSchema(pointer)) { if (schema) *schema = sc; + new (schemaMap_.template Push<SchemaEntry>()) SchemaEntry(source, const_cast<SchemaType*>(sc), false, allocator_); return true; } } } } @@ -1858,10 +1859,15 @@ return schemaStack_.Empty() ? 0 : CurrentContext().invalidKeyword; } //! Gets the JSON pointer pointed to the invalid value. PointerType GetInvalidDocumentPointer() const { - return documentStack_.Empty() ? PointerType() : PointerType(documentStack_.template Bottom<Ch>(), documentStack_.GetSize() / sizeof(Ch)); + if (documentStack_.Empty()) { + return PointerType(); + } + else { + return PointerType(documentStack_.template Bottom<Ch>(), documentStack_.GetSize() / sizeof(Ch)); + } } void NotMultipleOf(int64_t actual, const SValue& expected) { AddNumberError(SchemaType::GetMultipleOfString(), ValueType(actual).Move(), expected); }