summaryrefslogtreecommitdiff
path: root/sal
diff options
context:
space:
mode:
authorYukio Siraichi <yukio.siraichi@gmail.com>2020-03-09 23:22:20 +0900
committerMike Kaganski <mike.kaganski@collabora.com>2020-03-12 10:34:46 +0100
commit8e173a965d5684372e3fe0ee3d3599032bcb86c2 (patch)
tree7cd8282e599418b9c5cd1e3667fcba04c787b153 /sal
parent056ba01ee95db5dfd7df362e72bb418893c4c530 (diff)
tdf#130977 replace `rtl::math::isFinite` with `std::isfinite`.
- make all calls look like `std::isfinite`. - change the comments referring `rtl::math::isFinite`. Change-Id: I0cde9ceb9f20150467b454cddde5e62003cfde1a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90234 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'sal')
-rw-r--r--sal/rtl/math.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/sal/rtl/math.cxx b/sal/rtl/math.cxx
index af1457eac937..5f52b96a34c7 100644
--- a/sal/rtl/math.cxx
+++ b/sal/rtl/math.cxx
@@ -198,7 +198,7 @@ int findFirstSetBit(unsigned n)
*/
int getBitsInFracPart(double fAbsValue)
{
- assert(rtl::math::isFinite(fAbsValue) && fAbsValue >= 0.0);
+ assert(std::isfinite(fAbsValue) && fAbsValue >= 0.0);
if (fAbsValue == 0.0)
return 0;
auto pValParts = reinterpret_cast< const sal_math_Double * >(&fAbsValue);
@@ -1160,7 +1160,7 @@ double SAL_CALL rtl_math_pow10Exp(double fValue, int nExp) SAL_THROW_EXTERN_C()
double SAL_CALL rtl_math_approxValue( double fValue ) SAL_THROW_EXTERN_C()
{
const double fBigInt = 2199023255552.0; // 2^41 -> only 11 bits left for fractional part, fine as decimal
- if (fValue == 0.0 || fValue == HUGE_VAL || !::rtl::math::isFinite( fValue) || fValue > fBigInt)
+ if (fValue == 0.0 || fValue == HUGE_VAL || !std::isfinite( fValue) || fValue > fBigInt)
{
// We don't handle these conditions. Bail out.
return fValue;
@@ -1184,7 +1184,7 @@ double SAL_CALL rtl_math_approxValue( double fValue ) SAL_THROW_EXTERN_C()
fValue *= fExpValue;
// If the original value was near DBL_MIN we got an overflow. Restore and
// bail out.
- if (!rtl::math::isFinite(fValue))
+ if (!std::isfinite(fValue))
return fOrigValue;
fValue = rtl_math_round(fValue, 0, rtl_math_RoundingMode_Corrected);
@@ -1192,7 +1192,7 @@ double SAL_CALL rtl_math_approxValue( double fValue ) SAL_THROW_EXTERN_C()
// If the original value was near DBL_MAX we got an overflow. Restore and
// bail out.
- if (!rtl::math::isFinite(fValue))
+ if (!std::isfinite(fValue))
return fOrigValue;
return bSign ? -fValue : fValue;
@@ -1210,7 +1210,7 @@ bool SAL_CALL rtl_math_approxEqual(double a, double b) SAL_THROW_EXTERN_C()
return false;
const double d = fabs(a - b);
- if (!rtl::math::isFinite(d))
+ if (!std::isfinite(d))
return false; // Nan or Inf involved
if (d > ((a = fabs(a)) * e44) || d > ((b = fabs(b)) * e44))