Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
R
rapidjson
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
rapidjson
Commits
4b3d7c2f
Unverified
Commit
4b3d7c2f
authored
May 17, 2019
by
Milo Yip
Committed by
GitHub
May 17, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1506 from ylavic/CreatePattern
Add missing curly brackets in STDREGEX's CreatePattern().
parents
01950eb7
94fc4638
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
schema.h
include/rapidjson/schema.h
+2
-1
No files found.
include/rapidjson/schema.h
View file @
4b3d7c2f
...
@@ -1149,7 +1149,7 @@ private:
...
@@ -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:
...
@@ -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
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment