Commit a2b79377 authored by Jisi Liu's avatar Jisi Liu

using ::isnan to avoid conflicts with std::isnan for C++11 build.

Change-Id: I057b44eff04c3b0062a4fd4307ce6e4ca1eb952b
parent e6484d30
...@@ -302,7 +302,7 @@ bool IsMap(const google::protobuf::Field& field, ...@@ -302,7 +302,7 @@ bool IsMap(const google::protobuf::Field& field,
string DoubleAsString(double value) { string DoubleAsString(double value) {
if (value == std::numeric_limits<double>::infinity()) return "Infinity"; if (value == std::numeric_limits<double>::infinity()) return "Infinity";
if (value == -std::numeric_limits<double>::infinity()) return "-Infinity"; if (value == -std::numeric_limits<double>::infinity()) return "-Infinity";
if (isnan(value)) return "NaN"; if (::isnan(value)) return "NaN";
return SimpleDtoa(value); return SimpleDtoa(value);
} }
......
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