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 --- avmedia/source/win/window.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'avmedia/source') diff --git a/avmedia/source/win/window.cxx b/avmedia/source/win/window.cxx index 16deeee09a1e..a24682ae03bc 100644 --- a/avmedia/source/win/window.cxx +++ b/avmedia/source/win/window.cxx @@ -235,12 +235,12 @@ void Window::ImplLayoutVideoWindow() { if( aPrefSize.Width > 0 && aPrefSize.Height > 0 && nVideoW > 0 && nVideoH > 0 ) { - double fPrefWH = (double) aPrefSize.Width / aPrefSize.Height; + double fPrefWH = static_cast(aPrefSize.Width) / aPrefSize.Height; - if( fPrefWH < ( (double) nVideoW / nVideoH ) ) - nVideoW = (int)( nVideoH * fPrefWH ); + if( fPrefWH < ( static_cast(nVideoW) / nVideoH ) ) + nVideoW = static_cast( nVideoH * fPrefWH ); else - nVideoH = (int)( nVideoW / fPrefWH ); + nVideoH = static_cast( nVideoW / fPrefWH ); nX = ( nW - nVideoW ) >> 1; nY = ( nH - nVideoH ) >> 1; -- cgit v1.2.3