Make older compilers happy by using std::isnan instead of isnan

Both forms apparently work on more recent compilers
This commit is contained in:
Geert Janssens 2017-03-01 12:34:53 +01:00
parent 8e09bae7c7
commit 3e9d0c1fda

View File

@ -83,7 +83,7 @@ GncNumeric::GncNumeric(GncRational rr)
GncNumeric::GncNumeric(double d) : m_num(0), m_den(1)
{
static uint64_t max_leg_value{INT64_C(1000000000000000000)};
if (isnan(d) || fabs(d) > max_leg_value)
if (std::isnan(d) || fabs(d) > max_leg_value)
{
std::ostringstream msg;
msg << "Unable to construct a GncNumeric from " << d << ".\n";