Skip to content

Commit

Permalink
Fixing isfinite macro vs. std::isfinite error in melder.h
Browse files Browse the repository at this point in the history
  • Loading branch information
YannickJadoul committed Feb 9, 2018
1 parent 57dd5fe commit 76b4485
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions praat/sys/melder.h
Original file line number Diff line number Diff line change
Expand Up @@ -676,8 +676,13 @@ void NUMscale (double *x, double xminfrom, double xmaxfrom, double xminto, doubl
//inline static bool isdefined (double x) { return ! isinf (x) && ! isnan (x); } /* portable */
//inline static bool isdefined (double x) { return ((* (uint64_t *) & x) & 0x7FF0000000000000) != 0x7FF0000000000000; }
//inline static bool isundef (double x) { return ((* (uint64_t *) & x) & 0x7FF0000000000000) == 0x7FF0000000000000; }
#ifdef isfinite
inline static bool isdefined (double x) { return isfinite(x); }
inline static bool isundef (double x) { return !isfinite(x); }
#else
inline static bool isdefined (double x) { return std::isfinite(x); }
inline static bool isundef (double x) { return !std::isfinite(x); }
#endif

/********** Arrays with one index (NUMarrays.cpp) **********/

Expand Down

0 comments on commit 76b4485

Please sign in to comment.