Merge pull request #508 from pherl/nanfix

using ::isnan to avoid conflicts with std::isnan for C++11 build.
pull/509/head
Jisi Liu 10 years ago
commit d6286a9f41
  1. 2
      src/google/protobuf/util/internal/utility.cc

@ -302,7 +302,7 @@ bool IsMap(const google::protobuf::Field& field,
string DoubleAsString(double value) {
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);
}

Loading…
Cancel
Save