diff options
-rw-r--r-- | include/formula/errorcodes.hxx | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/include/formula/errorcodes.hxx b/include/formula/errorcodes.hxx index a92372c6681d..0f5fdad44320 100644 --- a/include/formula/errorcodes.hxx +++ b/include/formula/errorcodes.hxx @@ -87,14 +87,10 @@ const sal_uInt16 NOTAVAILABLE = 0x7fff; represent an interpreter error code. */ inline double CreateDoubleError( sal_uInt16 nErr ) { - union - { - double fVal; - sal_math_Double smVal; - }; - ::rtl::math::setNan( &fVal ); + sal_math_Double smVal; + ::rtl::math::setNan( &smVal.value ); smVal.nan_parts.fraction_lo = nErr; - return fVal; + return smVal.value; } /** Recreate the error code of a coded double error, if any. */ |