Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
C
capnproto
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
capnproto
Commits
0675ae4e
Commit
0675ae4e
authored
Apr 23, 2016
by
Kenton Varda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't expect C lib functions to be in std namespace.
parent
4e76021c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
json.c++
c++/src/capnp/compat/json.c++
+3
-3
No files found.
c++/src/capnp/compat/json.c++
View file @
0675ae4e
...
...
@@ -386,7 +386,7 @@ namespace {
int64_t
parseInt64
(
kj
::
StringPtr
s
)
{
char
*
endPtr
;
errno
=
0
;
int64_t
value
=
st
d
::
st
rtoll
(
s
.
begin
(),
&
endPtr
,
10
);
int64_t
value
=
strtoll
(
s
.
begin
(),
&
endPtr
,
10
);
KJ_REQUIRE
(
endPtr
==
s
.
end
(),
"String does not contain valid number"
,
s
);
KJ_REQUIRE
(
errno
!=
ERANGE
,
"Value out-of-range"
,
s
);
return
value
;
...
...
@@ -395,7 +395,7 @@ int64_t parseInt64(kj::StringPtr s) {
uint64_t
parseUInt64
(
kj
::
StringPtr
s
)
{
char
*
endPtr
;
errno
=
0
;
uint64_t
value
=
st
d
::
st
rtoull
(
s
.
begin
(),
&
endPtr
,
10
);
uint64_t
value
=
strtoull
(
s
.
begin
(),
&
endPtr
,
10
);
KJ_REQUIRE
(
endPtr
==
s
.
end
(),
"String does not contain valid number"
,
s
);
KJ_REQUIRE
(
errno
!=
ERANGE
,
"Value out-of-range"
,
s
);
return
value
;
...
...
@@ -404,7 +404,7 @@ uint64_t parseUInt64(kj::StringPtr s) {
double
parseFloat64
(
kj
::
StringPtr
s
)
{
char
*
endPtr
;
errno
=
0
;
double
value
=
st
d
::
st
rtod
(
s
.
begin
(),
&
endPtr
);
double
value
=
strtod
(
s
.
begin
(),
&
endPtr
);
KJ_REQUIRE
(
endPtr
==
s
.
end
(),
"String does not contain valid floating number"
,
s
);
return
value
;
}
...
...
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