Merge pull request #1335 from IceTrailer/master

Fixed parentheses in reader.h which were required to prevent the using of max macro
This commit is contained in:
Milo Yip 2018-08-01 11:55:44 +08:00 committed by GitHub
commit 91df56313b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1701,7 +1701,7 @@ private:
d = internal::StrtodNormalPrecision(d, p); d = internal::StrtodNormalPrecision(d, p);
// Use > max, instead of == inf, to fix bogus warning -Wfloat-equal // Use > max, instead of == inf, to fix bogus warning -Wfloat-equal
if (d > std::numeric_limits<double>::max()) { if (d > (std::numeric_limits<double>::max)()) {
// Overflow // Overflow
// TODO: internal::StrtodX should report overflow (or underflow) // TODO: internal::StrtodX should report overflow (or underflow)
RAPIDJSON_PARSE_ERROR(kParseErrorNumberTooBig, startOffset); RAPIDJSON_PARSE_ERROR(kParseErrorNumberTooBig, startOffset);