From 649313625b94e6b879848fc19b607b74375100bf Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Thu, 17 May 2018 11:28:56 +0200 Subject: New o3tl::temporary to simplify calls of std::modf ...that ignore the out-parameter integral part Change-Id: I05f07c1a8909023232f8aecf75ea5541d4eb81ca Reviewed-on: https://gerrit.libreoffice.org/54474 Reviewed-by: Stephan Bergmann Tested-by: Stephan Bergmann --- xmloff/source/forms/propertyimport.cxx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'xmloff/source/forms') diff --git a/xmloff/source/forms/propertyimport.cxx b/xmloff/source/forms/propertyimport.cxx index 3b15dcd69f40..d133e01a1d63 100644 --- a/xmloff/source/forms/propertyimport.cxx +++ b/xmloff/source/forms/propertyimport.cxx @@ -28,6 +28,7 @@ #include #include #include +#include #include #include #include "callbacks.hxx" @@ -186,9 +187,7 @@ Any PropertyConversion::convertString( const css::uno::Type& _rExpectedType, { case TYPE_DATE: { - double dummy; - (void) dummy; // avoid warning C4101 with some over-eager MSVC - OSL_ENSURE(std::modf(nValue, &dummy) == 0, + OSL_ENSURE(std::modf(nValue, &o3tl::temporary(double())) == 0, "PropertyConversion::convertString: a Date value with a fractional part?"); aReturn <<= lcl_getDate(nValue); } -- cgit