Add missing curly brackets in STDREGEX's CreatePattern().
This commit is contained in:
parent
01950eb7ac
commit
94fc463801
@ -1149,7 +1149,7 @@ private:
|
|||||||
#elif RAPIDJSON_SCHEMA_USE_STDREGEX
|
#elif RAPIDJSON_SCHEMA_USE_STDREGEX
|
||||||
template <typename ValueType>
|
template <typename ValueType>
|
||||||
RegexType* CreatePattern(const ValueType& value) {
|
RegexType* CreatePattern(const ValueType& value) {
|
||||||
if (value.IsString())
|
if (value.IsString()) {
|
||||||
RegexType *r = static_cast<RegexType*>(allocator_->Malloc(sizeof(RegexType)));
|
RegexType *r = static_cast<RegexType*>(allocator_->Malloc(sizeof(RegexType)));
|
||||||
try {
|
try {
|
||||||
return new (r) RegexType(value.GetString(), std::size_t(value.GetStringLength()), std::regex_constants::ECMAScript);
|
return new (r) RegexType(value.GetString(), std::size_t(value.GetStringLength()), std::regex_constants::ECMAScript);
|
||||||
@ -1157,6 +1157,7 @@ private:
|
|||||||
catch (const std::regex_error&) {
|
catch (const std::regex_error&) {
|
||||||
AllocatorType::Free(r);
|
AllocatorType::Free(r);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user