summaryrefslogtreecommitdiff
path: root/include/formula
diff options
context:
space:
mode:
authorBaiXiaochun <bai.xiaochun.mofan@protonmail.com>2021-06-29 17:38:29 +0200
committerMike Kaganski <mike.kaganski@collabora.com>2021-06-30 09:52:45 +0200
commit7838efe4b703945ccde963f8506c8c7744e04e6e (patch)
tree5b51faa8c5bd0799aafb1af702126f4b0feb852b /include/formula
parente9dc82b761a71369c4c49ae6d5fd8892f999c77a (diff)
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 'include/formula')
-rw-r--r--include/formula/errorcodes.hxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/formula/errorcodes.hxx b/include/formula/errorcodes.hxx
index 12696bb0579d..1a96a0c70223 100644
--- a/include/formula/errorcodes.hxx
+++ b/include/formula/errorcodes.hxx
@@ -24,6 +24,8 @@
#include <sal/mathconf.h>
#include <sal/types.h>
+#include <limits>
+
// Store as 16-bits, since error values are stored in tokens and formula results,
// and that can matter
enum class FormulaError : sal_uInt16
@@ -96,7 +98,7 @@ enum class FormulaError : sal_uInt16
inline double CreateDoubleError( FormulaError nErr )
{
sal_math_Double smVal;
- ::rtl::math::setNan( &smVal.value );
+ smVal.value = std::numeric_limits<double>::quiet_NaN();
smVal.nan_parts.fraction_lo = static_cast<unsigned>(nErr);
return smVal.value;
}