diff options
author | Eike Rathke <erack@redhat.com> | 2016-01-18 12:32:41 +0100 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2016-01-18 19:27:35 +0100 |
commit | 79b46d5fad29b8618fed539d04611bfb4f225c5f (patch) | |
tree | a1628a3f4fa52e2dd39aeb9e5360f759391bc05b /include/formula | |
parent | tdf#95878 made more useful function suggestion system in formula editing (diff) | |
download | core-79b46d5fad29b8618fed539d04611bfb4f225c5f.tar.gz core-79b46d5fad29b8618fed539d04611bfb4f225c5f.zip |
sal_math_Double is already a union containing a double member
Change-Id: I6e753bc0c5967ed07f162b0baa2daca4499953be
Diffstat (limited to 'include/formula')
-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. */ |