mirror of
https://github.com/MariaDB/server.git
synced 2026-04-23 08:45:33 +02:00
Use std::isfinite in C++ code
This is addition to parent revision fixing build failures.
This commit is contained in:
parent
031fa6d425
commit
54999f4e75
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 @@ 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
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue