Skip to content

Commit

Permalink
fix isnan+isinf usage (OpenAtomFoundation#5)
Browse files Browse the repository at this point in the history
* fix isnan+isinf usage

* <cmath> already included in utils.h
  • Loading branch information
funny-falcon-at-joomcode authored and Axlgrep committed Aug 10, 2018
1 parent c1ddc9c commit 7c67369
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -314,9 +314,9 @@ int StrToLongDouble(const char* s, size_t slen, long double* ldval) {
int LongDoubleToStr(long double ldval, std::string* value) {
char buf[256];
int len;
if (isnan(ldval)) {
if (std::isnan(ldval)) {
return -1;
} else if (isinf(ldval)) {
} else if (std::isinf(ldval)) {
/* Libc in odd systems (Hi Solaris!) will format infinite in a
* different way, so better to handle it in an explicit way. */
if (ldval > 0) {
Expand Down

0 comments on commit 7c67369

Please sign in to comment.