diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2018-01-22 13:11:34 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2018-01-23 07:54:51 +0100 |
commit | 9af8f190ed1bf3f76897ad0c078db16451d6fb69 (patch) | |
tree | 015089ee72a67eca7db999845cabb8104c8ce3aa /canvas | |
parent | 9602e63c818722c3910343b7af53917d031861c8 (diff) |
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 <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'canvas')
-rw-r--r-- | canvas/source/directx/dx_bitmapcanvashelper.cxx | 2 | ||||
-rw-r--r-- | canvas/source/directx/dx_canvashelper.cxx | 2 | ||||
-rw-r--r-- | canvas/source/directx/dx_textlayout_drawhelper.cxx | 12 | ||||
-rw-r--r-- | canvas/source/directx/dx_vcltools.cxx | 6 |
4 files changed, 11 insertions, 11 deletions
diff --git a/canvas/source/directx/dx_bitmapcanvashelper.cxx b/canvas/source/directx/dx_bitmapcanvashelper.cxx index 7e69484935c9..2d4954700e55 100644 --- a/canvas/source/directx/dx_bitmapcanvashelper.cxx +++ b/canvas/source/directx/dx_bitmapcanvashelper.cxx @@ -86,7 +86,7 @@ namespace dxcanvas GraphicsSharedPtr pGraphics( mpTarget->getGraphics() ); Gdiplus::Color aClearColor = hasAlpha() ? - Gdiplus::Color( 0,255,255,255 ) : Gdiplus::Color((Gdiplus::ARGB)Gdiplus::Color::White); + Gdiplus::Color( 0,255,255,255 ) : Gdiplus::Color(Gdiplus::ARGB(Gdiplus::Color::White)); ENSURE_OR_THROW( Gdiplus::Ok == pGraphics->SetCompositingMode( diff --git a/canvas/source/directx/dx_canvashelper.cxx b/canvas/source/directx/dx_canvashelper.cxx index 86222437d090..7fe441f081bf 100644 --- a/canvas/source/directx/dx_canvashelper.cxx +++ b/canvas/source/directx/dx_canvashelper.cxx @@ -146,7 +146,7 @@ namespace dxcanvas if( needOutput() ) { GraphicsSharedPtr pGraphics( mpGraphicsProvider->getGraphics() ); - Gdiplus::Color aClearColor = Gdiplus::Color((Gdiplus::ARGB)Gdiplus::Color::White); + Gdiplus::Color aClearColor = Gdiplus::Color(Gdiplus::ARGB(Gdiplus::Color::White)); ENSURE_OR_THROW( Gdiplus::Ok == pGraphics->SetCompositingMode( diff --git a/canvas/source/directx/dx_textlayout_drawhelper.cxx b/canvas/source/directx/dx_textlayout_drawhelper.cxx index 4edd59cab623..56469e17ee72 100644 --- a/canvas/source/directx/dx_textlayout_drawhelper.cxx +++ b/canvas/source/directx/dx_textlayout_drawhelper.cxx @@ -179,12 +179,12 @@ namespace dxcanvas // set world transform XFORM aXForm; - aXForm.eM11 = (FLOAT)aWorldTransform.get(0, 0); - aXForm.eM12 = (FLOAT)aWorldTransform.get(1, 0); - aXForm.eM21 = (FLOAT)aWorldTransform.get(0, 1); - aXForm.eM22 = (FLOAT)aWorldTransform.get(1, 1); - aXForm.eDx = (FLOAT)aWorldTransform.get(0, 2); - aXForm.eDy = (FLOAT)aWorldTransform.get(1, 2); + aXForm.eM11 = static_cast<FLOAT>(aWorldTransform.get(0, 0)); + aXForm.eM12 = static_cast<FLOAT>(aWorldTransform.get(1, 0)); + aXForm.eM21 = static_cast<FLOAT>(aWorldTransform.get(0, 1)); + aXForm.eM22 = static_cast<FLOAT>(aWorldTransform.get(1, 1)); + aXForm.eDx = static_cast<FLOAT>(aWorldTransform.get(0, 2)); + aXForm.eDy = static_cast<FLOAT>(aWorldTransform.get(1, 2)); // TODO(F3): This is NOT supported on 95/98/ME! SetGraphicsMode(hdc, GM_ADVANCED); diff --git a/canvas/source/directx/dx_vcltools.cxx b/canvas/source/directx/dx_vcltools.cxx index 1efc1e30b174..b8e511a09260 100644 --- a/canvas/source/directx/dx_vcltools.cxx +++ b/canvas/source/directx/dx_vcltools.cxx @@ -223,7 +223,7 @@ namespace dxcanvas // out notion of alpha is // different from the rest // of the world's - *pCurrOutput++ = 255 - (BYTE)*pAScan++; + *pCurrOutput++ = 255 - static_cast<BYTE>(*pAScan++); } } break; @@ -243,7 +243,7 @@ namespace dxcanvas // out notion of alpha is // different from the rest // of the world's - *pCurrOutput++ = 255 - (BYTE)*pAScan++; + *pCurrOutput++ = 255 - static_cast<BYTE>(*pAScan++); } } break; @@ -275,7 +275,7 @@ namespace dxcanvas // out notion of alpha is // different from the rest // of the world's - *pCurrOutput++ = 255 - (BYTE)*pAScan++; + *pCurrOutput++ = 255 - static_cast<BYTE>(*pAScan++); } } break; |