Fix bogus gcc warning

This commit is contained in:
abolz 2018-06-15 13:41:44 +02:00
parent a78c8e3a4f
commit 2ea43433e2

View File

@ -1700,7 +1700,8 @@ private:
else else
d = internal::StrtodNormalPrecision(d, p); d = internal::StrtodNormalPrecision(d, p);
if (d == std::numeric_limits<double>::infinity()) { // Use > max, instead of == inf, to fix bogus warning -Wfloat-equal
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);