Skip to content
Permalink
Browse files
Use std::isfinite in C++ code
This is addition to parent revision fixing build failures.
  • Loading branch information
Sergey Vojtovich committed May 23, 2018
1 parent 031fa6d commit 54999f4
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
@@ -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;
@@ -237,7 +237,7 @@ class Item_func :public Item_func_or_sum
*/
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
@@ -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();
}
@@ -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;
}

@@ -1952,7 +1952,7 @@ rtr_estimate_n_rows_in_range(

mtr.commit();

if (!isfinite(area)) {
if (!std::isfinite(area)) {
return(HA_POS_ERROR);
}

0 comments on commit 54999f4

Please sign in to comment.