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
08b1a8a4
Unverified
Commit
08b1a8a4
authored
Sep 10, 2018
by
Milo Yip
Committed by
GitHub
Sep 10, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1302 from chwarr/min-max-guard
Guard against min/max being macros in reader.h
parents
81af404b
960b9cfd
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
3 deletions
+3
-3
reader.h
include/rapidjson/reader.h
+0
-0
itoatest.cpp
test/unittest/itoatest.cpp
+2
-2
readertest.cpp
test/unittest/readertest.cpp
+1
-1
No files found.
include/rapidjson/reader.h
View file @
08b1a8a4
test/unittest/itoatest.cpp
View file @
08b1a8a4
...
...
@@ -79,12 +79,12 @@ static void Verify(void(*f)(T, char*), char* (*g)(T, char*)) {
do
{
VerifyValue
<
T
>
(
i
-
1
,
f
,
g
);
VerifyValue
<
T
>
(
i
,
f
,
g
);
if
(
std
::
numeric_limits
<
T
>::
min
()
<
0
)
{
if
(
(
std
::
numeric_limits
<
T
>::
min
)
()
<
0
)
{
VerifyValue
<
T
>
(
Traits
<
T
>::
Negate
(
i
),
f
,
g
);
VerifyValue
<
T
>
(
Traits
<
T
>::
Negate
(
i
+
1
),
f
,
g
);
}
last
=
i
;
if
(
i
>
static_cast
<
T
>
(
std
::
numeric_limits
<
T
>::
max
()
/
static_cast
<
T
>
(
power
)))
if
(
i
>
static_cast
<
T
>
(
(
std
::
numeric_limits
<
T
>::
max
)
()
/
static_cast
<
T
>
(
power
)))
break
;
i
*=
static_cast
<
T
>
(
power
);
}
while
(
last
<
i
);
...
...
test/unittest/readertest.cpp
View file @
08b1a8a4
...
...
@@ -422,7 +422,7 @@ static void TestParseDouble() {
"67546703537516986049910576551282076245490090389328944075868508455133942"
"30458323690322294816580855933212334827479782620414472316873817718091929"
"9881250404026184124858368"
,
std
::
numeric_limits
<
double
>::
max
());
(
std
::
numeric_limits
<
double
>::
max
)
());
TEST_DOUBLE
(
fullPrecision
,
"243546080556034731077856379609316893158278902575447060151047"
...
...
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