From 79b46d5fad29b8618fed539d04611bfb4f225c5f Mon Sep 17 00:00:00 2001 From: Eike Rathke Date: Mon, 18 Jan 2016 12:32:41 +0100 Subject: sal_math_Double is already a union containing a double member Change-Id: I6e753bc0c5967ed07f162b0baa2daca4499953be --- include/formula/errorcodes.hxx | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'include/formula') 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. */ -- cgit