diff options
author | BaiXiaochun <bai.xiaochun.mofan@protonmail.com> | 2021-06-29 17:38:29 +0200 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2021-06-30 09:52:45 +0200 |
commit | 7838efe4b703945ccde963f8506c8c7744e04e6e (patch) | |
tree | 5b51faa8c5bd0799aafb1af702126f4b0feb852b /chart2/source/inc | |
parent | Avoid accumulating a huge number of Trace Events before calling the callback (diff) | |
download | core-7838efe4b703945ccde963f8506c8c7744e04e6e.tar.gz core-7838efe4b703945ccde963f8506c8c7744e04e6e.zip |
Purge out rtl::math::setNan
Change-Id: If8794c105e279afd4437517d3e61f2f900eb6490
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118123
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'chart2/source/inc')
-rw-r--r-- | chart2/source/inc/CommonFunctors.hxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/chart2/source/inc/CommonFunctors.hxx b/chart2/source/inc/CommonFunctors.hxx index 9bdbce5af535..0340c82b692e 100644 --- a/chart2/source/inc/CommonFunctors.hxx +++ b/chart2/source/inc/CommonFunctors.hxx @@ -24,6 +24,8 @@ #include <rtl/ustring.hxx> #include "charttoolsdllapi.hxx" +#include <limits> + namespace chart::CommonFunctors { @@ -43,15 +45,13 @@ template< typename T > /** unary function to convert css::uno::Any into a double number. - <p>In case no number can be generated from the Any, NaN (see - rtl::math::SetNAN()) is returned.</p> + <p>In case no number can be generated from the Any, NaN is returned.</p> */ struct OOO_DLLPUBLIC_CHARTTOOLS AnyToDouble { double operator() ( const css::uno::Any & rAny ) { - double fResult; - ::rtl::math::setNan( & fResult ); + double fResult = std::numeric_limits<double>::quiet_NaN(); rAny >>= fResult; return fResult; } @@ -97,7 +97,7 @@ struct OOO_DLLPUBLIC_CHARTTOOLS OUStringToDouble double fResult = ::rtl::math::stringToDouble( rStr, '.', ',', & eConversionStatus ); if( eConversionStatus != rtl_math_ConversionStatus_Ok ) - ::rtl::math::setNan( & fResult ); + return std::numeric_limits<double>::quiet_NaN(); return fResult; } |