tidy up after merge from master

This commit is contained in:
Steve Hanson 2022-11-25 14:21:45 +00:00 committed by Milo Yip
parent 794248ee62
commit 7cad78e236
10 changed files with 39 additions and 40 deletions

View File

@ -1,4 +1,4 @@
CMAKE_MINIMUM_REQUIRED(VERSION 2.8) CMAKE_MINIMUM_REQUIRED(VERSION 2.8.12)
if(POLICY CMP0025) if(POLICY CMP0025)
# detect Apple's Clang # detect Apple's Clang
cmake_policy(SET CMP0025 NEW) cmake_policy(SET CMP0025 NEW)

Binary file not shown.

View File

@ -41,7 +41,8 @@ static std::string GetString(const ValueType& val) {
s << "false"; s << "false";
else if (val.IsFloat()) else if (val.IsFloat())
s << val.GetFloat(); s << val.GetFloat();
return s.str();} return s.str();
}
// Create the error message for a named error // Create the error message for a named error
// The error object can either be empty or contain at least member properties: // The error object can either be empty or contain at least member properties:

View File

@ -50,10 +50,6 @@
#define RAPIDJSON_SCHEMA_VERBOSE 0 #define RAPIDJSON_SCHEMA_VERBOSE 0
#endif #endif
#if RAPIDJSON_SCHEMA_VERBOSE
#include "stringbuffer.h"
#endif
RAPIDJSON_DIAG_PUSH RAPIDJSON_DIAG_PUSH
#if defined(__GNUC__) #if defined(__GNUC__)
@ -1309,6 +1305,8 @@ private:
else if (type == GetNumberString() ) type_ |= (1 << kNumberSchemaType) | (1 << kIntegerSchemaType); else if (type == GetNumberString() ) type_ |= (1 << kNumberSchemaType) | (1 << kIntegerSchemaType);
} }
// Creates parallel validators for allOf, anyOf, oneOf, not and schema dependencies, if required.
// Also creates a hasher for enums and array uniqueness, if required.
bool CreateParallelValidator(Context& context) const { bool CreateParallelValidator(Context& context) const {
if (enum_ || context.arrayUniqueness) if (enum_ || context.arrayUniqueness)
context.hasher = context.factory.CreateHasher(); context.hasher = context.factory.CreateHasher();

View File

@ -191,7 +191,7 @@ TEST(Uri, Parse_UTF16) {
#if RAPIDJSON_HAS_STDSTRING #if RAPIDJSON_HAS_STDSTRING
typedef std::basic_string<Value16::Ch> String; typedef std::basic_string<Value16::Ch> String;
String str = L"http://auth/path/xxx?query#frag"; String str = L"http://auth/path/xxx?query#frag";
const UriType uri = UriType(str); const UriType uri = UriType(str, &allocator);
EXPECT_TRUE(UriType::GetScheme(uri) == L"http:"); EXPECT_TRUE(UriType::GetScheme(uri) == L"http:");
EXPECT_TRUE(UriType::GetAuth(uri) == L"//auth"); EXPECT_TRUE(UriType::GetAuth(uri) == L"//auth");
EXPECT_TRUE(UriType::GetPath(uri) == L"/path/xxx"); EXPECT_TRUE(UriType::GetPath(uri) == L"/path/xxx");