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
78c7d54a
Commit
78c7d54a
authored
Jan 20, 2016
by
Milo Yip
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix #498 VC2015 warnings
parent
44f81f09
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
reader.h
include/rapidjson/reader.h
+3
-3
readertest.cpp
test/unittest/readertest.cpp
+1
-1
No files found.
include/rapidjson/reader.h
View file @
78c7d54a
...
...
@@ -886,7 +886,7 @@ private:
while
(
s
.
Peek
()
>=
'0'
&&
s
.
Peek
()
<=
'9'
)
{
if
(
i64
>=
RAPIDJSON_UINT64_C2
(
0x0CCCCCCC
,
0xCCCCCCCC
))
// 2^63 = 9223372036854775808
if
(
i64
!=
RAPIDJSON_UINT64_C2
(
0x0CCCCCCC
,
0xCCCCCCCC
)
||
s
.
Peek
()
>
'8'
)
{
d
=
i64
;
d
=
static_cast
<
double
>
(
i64
)
;
useDouble
=
true
;
break
;
}
...
...
@@ -897,7 +897,7 @@ private:
while
(
s
.
Peek
()
>=
'0'
&&
s
.
Peek
()
<=
'9'
)
{
if
(
i64
>=
RAPIDJSON_UINT64_C2
(
0x19999999
,
0x99999999
))
// 2^64 - 1 = 18446744073709551615
if
(
i64
!=
RAPIDJSON_UINT64_C2
(
0x19999999
,
0x99999999
)
||
s
.
Peek
()
>
'5'
)
{
d
=
i64
;
d
=
static_cast
<
double
>
(
i64
)
;
useDouble
=
true
;
break
;
}
...
...
@@ -968,7 +968,7 @@ private:
int
exp
=
0
;
if
(
s
.
Peek
()
==
'e'
||
s
.
Peek
()
==
'E'
)
{
if
(
!
useDouble
)
{
d
=
use64bit
?
i64
:
i
;
d
=
static_cast
<
double
>
(
use64bit
?
i64
:
i
)
;
useDouble
=
true
;
}
s
.
Take
();
...
...
test/unittest/readertest.cpp
View file @
78c7d54a
...
...
@@ -409,7 +409,7 @@ TEST(Reader, ParseNumber_NormalPrecisionError) {
a
=
h
.
actual_
;
uint64_t
bias1
=
e
.
ToBias
();
uint64_t
bias2
=
a
.
ToBias
();
double
ulp
=
bias1
>=
bias2
?
bias1
-
bias2
:
bias2
-
bias1
;
double
ulp
=
static_cast
<
double
>
(
bias1
>=
bias2
?
bias1
-
bias2
:
bias2
-
bias1
)
;
ulpMax
=
std
::
max
(
ulpMax
,
ulp
);
ulpSum
+=
ulp
;
}
...
...
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