diff options
author | ylavic <ylavic.dev@gmail.com> | 2019-04-29 15:06:52 +0200 |
---|---|---|
committer | ylavic <ylavic.dev@gmail.com> | 2019-04-29 15:06:52 +0200 |
commit | 94fc4638018a800502d0d1629898eb1809ab25a8 (patch) | |
tree | 1ca1a793a1c76c47dcbd780ca7e1af3aeb69e1ab | |
parent | 01950eb7acec78818d68b762efc869bba2420d82 (diff) | |
download | rapidjson-94fc4638018a800502d0d1629898eb1809ab25a8.tar.gz |
Add missing curly brackets in STDREGEX's CreatePattern().
-rw-r--r-- | include/rapidjson/schema.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/rapidjson/schema.h b/include/rapidjson/schema.h index 5b622f7..26ae947 100644 --- a/include/rapidjson/schema.h +++ b/include/rapidjson/schema.h @@ -1149,7 +1149,7 @@ private: #elif RAPIDJSON_SCHEMA_USE_STDREGEX template <typename ValueType> RegexType* CreatePattern(const ValueType& value) { - if (value.IsString()) + if (value.IsString()) { RegexType *r = static_cast<RegexType*>(allocator_->Malloc(sizeof(RegexType))); try { 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&) { AllocatorType::Free(r); } + } return 0; } |