Use std::isfinite in C++ code

This is addition to parent revision fixing build failures.
This commit is contained in:
Sergey Vojtovich 2018-05-23 18:52:55 +04:00
commit 54999f4e75
5 changed files with 5 additions and 5 deletions

View file

@ -2873,7 +2873,7 @@ int Field_decimal::store(double nr)
return 1;
}
if (!isfinite(nr)) // Handle infinity as special case
if (!std::isfinite(nr)) // Handle infinity as special case
{
overflow(nr < 0.0);
return 1;

View file

@ -237,7 +237,7 @@ public:
*/
inline double check_float_overflow(double value)
{
return isfinite(value) ? value : raise_float_overflow();
return std::isfinite(value) ? value : raise_float_overflow();
}
/**
Throw an error if the input BIGINT value represented by the

View file

@ -2641,7 +2641,7 @@ String *Item_func_format::val_str_ascii(String *str)
return 0; /* purecov: inspected */
nr= my_double_round(nr, (longlong) dec, FALSE, FALSE);
str->set_real(nr, dec, &my_charset_numeric);
if (!isfinite(nr))
if (!std::isfinite(nr))
return str;
str_length=str->length();
}

View file

@ -355,7 +355,7 @@ mbr_join_square(
/* Check if finite (not infinity or NaN),
so we don't get NaN in calculations */
if (!isfinite(square)) {
if (!std::isfinite(square)) {
return DBL_MAX;
}

View file

@ -1952,7 +1952,7 @@ rtr_estimate_n_rows_in_range(
mtr.commit();
if (!isfinite(area)) {
if (!std::isfinite(area)) {
return(HA_POS_ERROR);
}