[Libreoffice-commits] core.git: include/formula

Eike Rathke erack at redhat.com
Mon Jan 18 10:28:26 PST 2016


 include/formula/errorcodes.hxx |   10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

New commits:
commit 79b46d5fad29b8618fed539d04611bfb4f225c5f
Author: Eike Rathke <erack at redhat.com>
Date:   Mon Jan 18 12:32:41 2016 +0100

    sal_math_Double is already a union containing a double member
    
    Change-Id: I6e753bc0c5967ed07f162b0baa2daca4499953be

diff --git a/include/formula/errorcodes.hxx b/include/formula/errorcodes.hxx
index a92372c..0f5fdad 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. */


More information about the Libreoffice-commits mailing list