Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
json
Project
Overview
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
json
Commits
abad903f
Commit
abad903f
authored
Jul 05, 2013
by
Niels
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- memory problem
parent
61461ec4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
JSON.cc
src/JSON.cc
+2
-2
No files found.
src/JSON.cc
View file @
abad903f
...
@@ -591,11 +591,11 @@ JSON::parser::parser(std::string& s) : _pos(0) {
...
@@ -591,11 +591,11 @@ JSON::parser::parser(std::string& s) : _pos(0) {
JSON
::
parser
::
parser
(
std
::
istream
&
_is
)
:
_pos
(
0
)
{
JSON
::
parser
::
parser
(
std
::
istream
&
_is
)
:
_pos
(
0
)
{
// determine length of input stream
// determine length of input stream
_is
.
seekg
(
0
,
std
::
ios
::
end
);
_is
.
seekg
(
0
,
std
::
ios
::
end
);
s
td
::
streampos
length
=
_is
.
tellg
();
s
ize_t
length
=
_is
.
tellg
();
_is
.
seekg
(
0
,
std
::
ios
::
beg
);
_is
.
seekg
(
0
,
std
::
ios
::
beg
);
// copy stream to buffer
// copy stream to buffer
_buffer
=
new
char
[
length
];
_buffer
=
new
char
[
length
+
1
];
_is
.
read
(
_buffer
,
length
);
_is
.
read
(
_buffer
,
length
);
// read first character
// read first character
...
...
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