From ad73c032e714af439d0aadb7946bf63706824736 Mon Sep 17 00:00:00 2001 From: Steve Hanson Date: Thu, 25 Feb 2021 22:51:35 +0000 Subject: [PATCH] fix compile errors --- example/schemavalidator/schemavalidator.cpp | 2 ++ include/rapidjson/schema.h | 2 +- test/unittest/schematest.cpp | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/example/schemavalidator/schemavalidator.cpp b/example/schemavalidator/schemavalidator.cpp index bffd64a..8c7e26c 100644 --- a/example/schemavalidator/schemavalidator.cpp +++ b/example/schemavalidator/schemavalidator.cpp @@ -2,6 +2,8 @@ // The example validates JSON text from stdin with a JSON schema specified in the argument. +#define RAPIDJSON_HAS_STDSTRING 1 + #include "rapidjson/error/en.h" #include "rapidjson/filereadstream.h" #include "rapidjson/schema.h" diff --git a/include/rapidjson/schema.h b/include/rapidjson/schema.h index 082fbbd..e9ed19d 100644 --- a/include/rapidjson/schema.h +++ b/include/rapidjson/schema.h @@ -2118,7 +2118,7 @@ private: SchemaType* typeless_; internal::Stack schemaMap_; // Stores created Pointer -> Schemas internal::Stack schemaRef_; // Stores Pointer(s) from $ref(s) until resolved - SValue uri_; + SValue uri_; // Schema document URI }; //! GenericSchemaDocument using Value type. diff --git a/test/unittest/schematest.cpp b/test/unittest/schematest.cpp index b3b9291..d84fcd4 100644 --- a/test/unittest/schematest.cpp +++ b/test/unittest/schematest.cpp @@ -2136,7 +2136,7 @@ public: virtual const SchemaDocumentType* GetRemoteDocument(const char* uri, SizeType length) { for (size_t i = 0; i < kCount; i++) - if (typename SchemaDocumentType::SType(uri, length) == sd_[i]->GetURI()) + if (typename SchemaDocumentType::SValue(uri, length) == sd_[i]->GetURI()) return sd_[i]; return 0; }