Commit 2ea43433 authored by abolz's avatar abolz

Fix bogus gcc warning

parent a78c8e3a
......@@ -1700,7 +1700,8 @@ private:
else
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
// TODO: internal::StrtodX should report overflow (or underflow)
RAPIDJSON_PARSE_ERROR(kParseErrorNumberTooBig, startOffset);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment