Skip to content

Commit

Permalink
Merge pull request protocolbuffers#508 from pherl/nanfix
Browse files Browse the repository at this point in the history
using ::isnan to avoid conflicts with std::isnan for C++11 build.
  • Loading branch information
liujisi committed Jun 18, 2015
2 parents e6484d3 + a2b7937 commit d6286a9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/google/protobuf/util/internal/utility.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit d6286a9

Please sign in to comment.