From 9af8f190ed1bf3f76897ad0c078db16451d6fb69 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Mon, 22 Jan 2018 13:11:34 +0100 Subject: More loplugin:cstylecast on Windows Automatic rewrite (of loplugin:cstylecast and loplugin:unnecessaryparen) after cab0427cadddb3aaf1349c66f2fa13a4234ba4b2 "Enable loplugin:cstylecast for some more cases" and a409d32e7f6fc09e041079d6dbc3c927497adfed "More loplugin:cstylecast" Change-Id: Ib3355159dd08333e1b7a8d091caf2069cdcc7862 Reviewed-on: https://gerrit.libreoffice.org/48317 Tested-by: Jenkins Reviewed-by: Stephan Bergmann --- stoc/source/typeconv/convert.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'stoc') diff --git a/stoc/source/typeconv/convert.cxx b/stoc/source/typeconv/convert.cxx index e3844d19feda..919a5edc7818 100644 --- a/stoc/source/typeconv/convert.cxx +++ b/stoc/source/typeconv/convert.cxx @@ -64,13 +64,13 @@ static const sal_Int64 SAL_INT64_MIN = /* MS Visual C++ no conversion from unsigned __int64 to double */ #ifdef _MSC_VER -static const double DOUBLE_SAL_UINT64_MAX = ((((double)SAL_INT64_MAX) * 2) + 1); +static const double DOUBLE_SAL_UINT64_MAX = (((double(SAL_INT64_MAX)) * 2) + 1); static inline double unsigned_int64_to_double( sal_uInt64 n ) { sal_uInt64 n2 = (n / 3); n -= (2 * n2); - return (((double)(sal_Int64)n2) * 2.0) + ((double)(sal_Int64)n); + return (static_cast(static_cast(n2)) * 2.0) + static_cast(static_cast(n)); } #else static const double DOUBLE_SAL_UINT64_MAX = -- cgit