summaryrefslogtreecommitdiff
path: root/include/formula
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2016-01-18 12:32:41 +0100
committerEike Rathke <erack@redhat.com>2016-01-18 19:27:35 +0100
commit79b46d5fad29b8618fed539d04611bfb4f225c5f (patch)
treea1628a3f4fa52e2dd39aeb9e5360f759391bc05b /include/formula
parentb2a82d9bb256516ac589350579b90f43b68bd452 (diff)
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.hxx10
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. */