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
4a152646
Commit
4a152646
authored
Jul 17, 2014
by
thebusytypist
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix compilation error for gcc/clang.
parent
fa25f93d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
reader.h
include/rapidjson/reader.h
+3
-3
No files found.
include/rapidjson/reader.h
View file @
4a152646
...
...
@@ -277,7 +277,7 @@ public:
\param allocator Optional allocator for allocating stack memory. (Only use for non-destructive parsing)
\param stackCapacity stack capacity in bytes for storing a single decoded string. (Only use for non-destructive parsing)
*/
GenericReader
(
size_t
limit
=
0
,
Allocator
*
allocator
=
0
,
size_t
stackCapacity
=
kDefaultStackCapacity
)
:
stack_
(
allocator
,
stackCapacity
),
kStackSizeLimit
(
limit
),
parseResult_
()
{}
GenericReader
(
size_t
limit
=
0
,
Allocator
*
allocator
=
0
,
size_t
stackCapacity
=
kDefaultStackCapacity
)
:
stack_
(
allocator
,
stackCapacity
),
kStackSizeLimit
_
(
limit
),
parseResult_
()
{}
//! Parse JSON text.
/*! \tparam parseFlags Combination of \ref ParseFlag.
...
...
@@ -1225,12 +1225,12 @@ private:
}
bool
CheckStackSpaceQuota
(
size_t
size
)
const
{
return
kStackSizeLimit
==
0
||
(
stack_
.
GetSize
()
+
size
<=
kStackSizeLimit
);
return
kStackSizeLimit
_
==
0
||
(
stack_
.
GetSize
()
+
size
<=
kStackSizeLimit_
);
}
static
const
size_t
kDefaultStackCapacity
=
256
;
//!< Default stack capacity in bytes for storing a single decoded string.
const
size_t
kStackSizeLimit
;
//!< Stack size limit(in bytes). A value of 0 means no limit.
internal
::
Stack
<
Allocator
>
stack_
;
//!< A stack for storing decoded string temporarily during non-destructive parsing.
const
size_t
kStackSizeLimit_
;
//!< Stack size limit(in bytes). A value of 0 means no limit.
ParseResult
parseResult_
;
};
// class GenericReader
...
...
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