Commit 2bfd0cc6 authored by Yuri Khan's avatar Yuri Khan

internal::Schema: Keep pointer for future use

parent 379b3374
......@@ -349,6 +349,7 @@ public:
Schema(SchemaDocumentType* schemaDocument, const PointerType& p, const ValueType& value, const ValueType& document, AllocatorType* allocator) :
allocator_(allocator),
pointer_(p),
typeless_(schemaDocument->GetTypeless()),
enum_(),
enumCount_(),
......@@ -596,6 +597,10 @@ public:
#endif
}
const PointerType& GetPointer() const {
return pointer_;
}
bool BeginValue(Context& context) const {
if (context.inArray) {
if (uniqueItems_)
......@@ -1215,6 +1220,7 @@ private:
};
AllocatorType* allocator_;
PointerType pointer_;
const SchemaType* typeless_;
uint64_t* enum_;
SizeType enumCount_;
......@@ -1650,7 +1656,7 @@ public:
//! Gets the JSON pointer pointed to the invalid schema.
PointerType GetInvalidSchemaPointer() const {
return schemaStack_.Empty() ? PointerType() : schemaDocument_->GetPointer(&CurrentSchema());
return schemaStack_.Empty() ? PointerType() : CurrentSchema().GetPointer();
}
//! Gets the keyword of invalid schema.
......
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