mirror of
https://github.com/Tencent/rapidjson.git
synced 2025-11-11 09:05:37 +01:00
tidy up after merge from master
This commit is contained in:
@@ -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)
|
||||||
|
|||||||
@@ -130,6 +130,9 @@
|
|||||||
"phone_type": {
|
"phone_type": {
|
||||||
"pattern": "^[0-9]*-[0-9]*",
|
"pattern": "^[0-9]*-[0-9]*",
|
||||||
"type": "string"
|
"type": "string"
|
||||||
|
},
|
||||||
|
"url_type": {
|
||||||
|
"type": "string"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -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:
|
||||||
|
|||||||
@@ -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();
|
||||||
|
|||||||
@@ -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");
|
||||||
|
|||||||
Reference in New Issue
Block a user