diff options
author | Yukio Siraichi <yukio.siraichi@gmail.com> | 2020-03-13 15:41:40 +0900 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2020-03-14 09:19:00 +0100 |
commit | 3bf3face224a7e12ba95888821a0ac21525af22c (patch) | |
tree | 93908386dd614404e46898ae16ee179549a1a0f9 /sc | |
parent | 8f8b64cad377c6d767cdf291fd00225658bd02c5 (diff) |
tdf#130975 replace `rtl::math::isNan` with `std::isnan`.
Change-Id: I5d53e6369d35093445b2efd8936bbf8c6775ff47
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90451
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/qa/unit/ucalc.cxx | 8 | ||||
-rw-r--r-- | sc/qa/unit/ucalc_formula.cxx | 26 | ||||
-rw-r--r-- | sc/source/core/data/dptabsrc.cxx | 2 | ||||
-rw-r--r-- | sc/source/core/tool/interpr2.cxx | 2 | ||||
-rw-r--r-- | sc/source/core/tool/interpr4.cxx | 2 |
5 files changed, 20 insertions, 20 deletions
diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx index 9b6f41a3e284..964247b9fe7f 100644 --- a/sc/qa/unit/ucalc.cxx +++ b/sc/qa/unit/ucalc.cxx @@ -1851,8 +1851,8 @@ void Test::testMatrix() CPPUNIT_ASSERT_EQUAL(SAL_N_ELEMENTS(pChecks), aDoubles.size()); for (size_t i = 0, n = aDoubles.size(); i < n; ++i) { - if (rtl::math::isNan(pChecks[i])) - CPPUNIT_ASSERT_MESSAGE("NaN is expected, but it's not.", rtl::math::isNan(aDoubles[i])); + if (std::isnan(pChecks[i])) + CPPUNIT_ASSERT_MESSAGE("NaN is expected, but it's not.", std::isnan(aDoubles[i])); else CPPUNIT_ASSERT_EQUAL(pChecks[i], aDoubles[i]); } @@ -1867,8 +1867,8 @@ void Test::testMatrix() CPPUNIT_ASSERT_EQUAL(SAL_N_ELEMENTS(pChecks), aDoubles.size()); for (size_t i = 0, n = aDoubles.size(); i < n; ++i) { - if (rtl::math::isNan(pChecks[i])) - CPPUNIT_ASSERT_MESSAGE("NaN is expected, but it's not.", rtl::math::isNan(aDoubles[i])); + if (std::isnan(pChecks[i])) + CPPUNIT_ASSERT_MESSAGE("NaN is expected, but it's not.", std::isnan(aDoubles[i])); else CPPUNIT_ASSERT_EQUAL(pChecks[i], aDoubles[i]); } diff --git a/sc/qa/unit/ucalc_formula.cxx b/sc/qa/unit/ucalc_formula.cxx index f9babfa4772d..f62185f81455 100644 --- a/sc/qa/unit/ucalc_formula.cxx +++ b/sc/qa/unit/ucalc_formula.cxx @@ -221,7 +221,7 @@ bool isEmpty( const formula::VectorRefArray& rArray, size_t nPos ) } if (rArray.mpNumericArray) - return rtl::math::isNan(rArray.mpNumericArray[nPos]); + return std::isnan(rArray.mpNumericArray[nPos]); else return true; } @@ -705,33 +705,33 @@ void Test::testFetchVectorRefArray() aArray = m_pDoc->FetchVectorRefArray(ScAddress(0,0,0), 3); // A1:A3 CPPUNIT_ASSERT_MESSAGE("Array should have a numeric array.", aArray.mpNumericArray); CPPUNIT_ASSERT_MESSAGE("Array should NOT have a string array.", !aArray.mpStringArray); - CPPUNIT_ASSERT(rtl::math::isNan(aArray.mpNumericArray[0])); - CPPUNIT_ASSERT(rtl::math::isNan(aArray.mpNumericArray[1])); - CPPUNIT_ASSERT(rtl::math::isNan(aArray.mpNumericArray[2])); + CPPUNIT_ASSERT(std::isnan(aArray.mpNumericArray[0])); + CPPUNIT_ASSERT(std::isnan(aArray.mpNumericArray[1])); + CPPUNIT_ASSERT(std::isnan(aArray.mpNumericArray[2])); // Totally empty range in a non-empty column (Column B). m_pDoc->SetString(ScAddress(1,10,0), "Some text"); // B11 aArray = m_pDoc->FetchVectorRefArray(ScAddress(1,0,0), 3); // B1:B3 CPPUNIT_ASSERT_MESSAGE("Array should have a numeric array.", aArray.mpNumericArray); CPPUNIT_ASSERT_MESSAGE("Array should NOT have a string array.", !aArray.mpStringArray); - CPPUNIT_ASSERT(rtl::math::isNan(aArray.mpNumericArray[0])); - CPPUNIT_ASSERT(rtl::math::isNan(aArray.mpNumericArray[1])); - CPPUNIT_ASSERT(rtl::math::isNan(aArray.mpNumericArray[2])); + CPPUNIT_ASSERT(std::isnan(aArray.mpNumericArray[0])); + CPPUNIT_ASSERT(std::isnan(aArray.mpNumericArray[1])); + CPPUNIT_ASSERT(std::isnan(aArray.mpNumericArray[2])); aArray = m_pDoc->FetchVectorRefArray(ScAddress(1,12,0), 3); // B13:B15 CPPUNIT_ASSERT_MESSAGE("Array should have a numeric array.", aArray.mpNumericArray); CPPUNIT_ASSERT_MESSAGE("Array should NOT have a string array.", !aArray.mpStringArray); - CPPUNIT_ASSERT(rtl::math::isNan(aArray.mpNumericArray[0])); - CPPUNIT_ASSERT(rtl::math::isNan(aArray.mpNumericArray[1])); - CPPUNIT_ASSERT(rtl::math::isNan(aArray.mpNumericArray[2])); + CPPUNIT_ASSERT(std::isnan(aArray.mpNumericArray[0])); + CPPUNIT_ASSERT(std::isnan(aArray.mpNumericArray[1])); + CPPUNIT_ASSERT(std::isnan(aArray.mpNumericArray[2])); // These values come from a cache because of the call above. aArray = m_pDoc->FetchVectorRefArray(ScAddress(1,1,0), 3); // B2:B4 CPPUNIT_ASSERT_MESSAGE("Array should have a numeric array.", aArray.mpNumericArray); CPPUNIT_ASSERT_MESSAGE("Array should NOT have a string array.", !aArray.mpStringArray); - CPPUNIT_ASSERT(rtl::math::isNan(aArray.mpNumericArray[0])); - CPPUNIT_ASSERT(rtl::math::isNan(aArray.mpNumericArray[1])); - CPPUNIT_ASSERT(rtl::math::isNan(aArray.mpNumericArray[2])); + CPPUNIT_ASSERT(std::isnan(aArray.mpNumericArray[0])); + CPPUNIT_ASSERT(std::isnan(aArray.mpNumericArray[1])); + CPPUNIT_ASSERT(std::isnan(aArray.mpNumericArray[2])); // The column begins with a string header at row 1 (Column C). m_pDoc->SetString(ScAddress(2,0,0), "MyHeader"); diff --git a/sc/source/core/data/dptabsrc.cxx b/sc/source/core/data/dptabsrc.cxx index bd58c00461eb..4c2a189f6c20 100644 --- a/sc/source/core/data/dptabsrc.cxx +++ b/sc/source/core/data/dptabsrc.cxx @@ -403,7 +403,7 @@ uno::Sequence<double> ScDPSource::getFilteredResults( { // Try to get result from the leaf nodes. double fVal = maResFilterSet.getLeafResult(aFilters[0]); - if (!rtl::math::isNan(fVal)) + if (!std::isnan(fVal)) { uno::Sequence<double> aRet(1); aRet[0] = fVal; diff --git a/sc/source/core/tool/interpr2.cxx b/sc/source/core/tool/interpr2.cxx index 37b25cc2215a..891fcbc7e798 100644 --- a/sc/source/core/tool/interpr2.cxx +++ b/sc/source/core/tool/interpr2.cxx @@ -3724,7 +3724,7 @@ void ScInterpreter::ScGetPivotData() } double fVal = pDPObj->GetPivotData(aDataFieldName, aFilters); - if (rtl::math::isNan(fVal)) + if (std::isnan(fVal)) { PushError(FormulaError::NoRef); return; diff --git a/sc/source/core/tool/interpr4.cxx b/sc/source/core/tool/interpr4.cxx index b76837af51c3..f1506f60adeb 100644 --- a/sc/source/core/tool/interpr4.cxx +++ b/sc/source/core/tool/interpr4.cxx @@ -4667,7 +4667,7 @@ StackVar ScInterpreter::Interpret() { // This matrix represents a range reference. Apply implicit intersection. double fVal = applyImplicitIntersection(aMat, aPos); - if (rtl::math::isNan(fVal)) + if (std::isnan(fVal)) PushNoValue(); else PushInt(fVal); |