diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-11-16 10:41:03 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-11-21 12:44:55 +0100 |
commit | 2dbd02b576f28224204ac962f6ce20fde6687093 (patch) | |
tree | 28b3f8807d5909e7bcc3c5a629dadd6f475ad9d3 /vcl | |
parent | 48314f25241e014a634dd5371543b90137ffd2bc (diff) |
loplugin:redundantfcast improvements
check for calls to constructors, and extend the list of types we check
for unnecessary temporary creation
Change-Id: Ia2c1f202b41ed6866779fff5343c821128033eec
Reviewed-on: https://gerrit.libreoffice.org/63472
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/inc/opengl/RenderList.hxx | 2 | ||||
-rw-r--r-- | vcl/opengl/gdiimpl.cxx | 2 | ||||
-rw-r--r-- | vcl/source/app/salvtables.cxx | 2 | ||||
-rw-r--r-- | vcl/source/font/FeatureCollector.cxx | 2 | ||||
-rw-r--r-- | vcl/source/graphic/UnoGraphic.cxx | 2 | ||||
-rw-r--r-- | vcl/source/window/brdwin.cxx | 2 | ||||
-rw-r--r-- | vcl/source/window/builder.cxx | 2 | ||||
-rw-r--r-- | vcl/workben/vcldemo.cxx | 2 |
8 files changed, 8 insertions, 8 deletions
diff --git a/vcl/inc/opengl/RenderList.hxx b/vcl/inc/opengl/RenderList.hxx index b8595921a46a..cd8787c824e1 100644 --- a/vcl/inc/opengl/RenderList.hxx +++ b/vcl/inc/opengl/RenderList.hxx @@ -120,7 +120,7 @@ private: double area; for (size_t i = 1; i < maRectangles.size(); ++i) { - aTempRectangle = basegfx::B2DRange(maRectangles[i]); + aTempRectangle = maRectangles[i]; aTempRectangle.expand(rDrawRectangle); area = aTempRectangle.getWidth() * aTempRectangle.getHeight(); if (area < minArea) diff --git a/vcl/opengl/gdiimpl.cxx b/vcl/opengl/gdiimpl.cxx index 6c9f9de494d2..7b34620983c2 100644 --- a/vcl/opengl/gdiimpl.cxx +++ b/vcl/opengl/gdiimpl.cxx @@ -2029,7 +2029,7 @@ bool OpenGLSalGraphicsImpl::drawAlphaRect( sal_uInt8 nTransparency ) { VCL_GL_INFO("::drawAlphaRect (" << nX << ", " << nY << ") [" << nWidth << ", " << nHeight << "]"); - mpRenderList->addDrawRectangle(nX, nY, nWidth, nHeight, double(nTransparency / 100.0), mnLineColor, mnFillColor); + mpRenderList->addDrawRectangle(nX, nY, nWidth, nHeight, nTransparency / 100.0, mnLineColor, mnFillColor); PostBatchDraw(); return true; } diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx index b117e34f15d6..ea574dd322dc 100644 --- a/vcl/source/app/salvtables.cxx +++ b/vcl/source/app/salvtables.cxx @@ -526,7 +526,7 @@ namespace Image createImage(VirtualDevice& rDevice) { - return Image(BitmapEx(rDevice.GetBitmapEx(Point(), rDevice.GetOutputSizePixel()))); + return Image(rDevice.GetBitmapEx(Point(), rDevice.GetOutputSizePixel())); } void insert_to_menu(PopupMenu* pMenu, int pos, const OUString& rId, const OUString& rStr, diff --git a/vcl/source/font/FeatureCollector.cxx b/vcl/source/font/FeatureCollector.cxx index 4e1862388e9a..93cc9cdb1ebb 100644 --- a/vcl/source/font/FeatureCollector.cxx +++ b/vcl/source/font/FeatureCollector.cxx @@ -103,7 +103,7 @@ void FeatureCollector::collectForLanguage(hb_tag_t aTableTag, sal_uInt32 nScript = OpenTypeFeatureDefinitonList::get().getDefinition(aFeatureTag); if (aDefinition) { - rFeature.m_aDefinition = vcl::font::FeatureDefinition(aDefinition); + rFeature.m_aDefinition = aDefinition; } } } diff --git a/vcl/source/graphic/UnoGraphic.cxx b/vcl/source/graphic/UnoGraphic.cxx index f6a3431a7068..45225261f836 100644 --- a/vcl/source/graphic/UnoGraphic.cxx +++ b/vcl/source/graphic/UnoGraphic.cxx @@ -43,7 +43,7 @@ Graphic::~Graphic() throw() void Graphic::init( const ::Graphic& rGraphic ) throw() { - maGraphic = ::Graphic(rGraphic); + maGraphic = rGraphic; unographic::GraphicDescriptor::init(maGraphic); } diff --git a/vcl/source/window/brdwin.cxx b/vcl/source/window/brdwin.cxx index 08121d571ac5..9428ee709599 100644 --- a/vcl/source/window/brdwin.cxx +++ b/vcl/source/window/brdwin.cxx @@ -1400,7 +1400,7 @@ void ImplStdBorderWindowView::DrawWindow(vcl::RenderContext& rRenderContext, con { ImplBorderFrameData* pData = &maFrameData; ImplBorderWindow* pBorderWindow = pData->mpBorderWindow; - Point aTmpPoint = pOffset ? Point(*pOffset) : Point(); + Point aTmpPoint = pOffset ? *pOffset : Point(); tools::Rectangle aInRect( aTmpPoint, Size( pData->mnWidth, pData->mnHeight ) ); const StyleSettings& rStyleSettings = rRenderContext.GetSettings().GetStyleSettings(); DecorationView aDecoView(&rRenderContext); diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx index edb7398b69a3..6e782336f75f 100644 --- a/vcl/source/window/builder.cxx +++ b/vcl/source/window/builder.cxx @@ -2470,7 +2470,7 @@ VclPtr<vcl::Window> VclBuilder::insertObject(vcl::Window *pParent, const OString pCurrentChild->set_font_attribute(rKey, rValue); } - m_pParserState->m_aAtkInfo[VclPtr<vcl::Window>(pCurrentChild)] = rAtk; + m_pParserState->m_aAtkInfo[pCurrentChild] = rAtk; } rProps.clear(); diff --git a/vcl/workben/vcldemo.cxx b/vcl/workben/vcldemo.cxx index eab50a288175..b14bc4d96c80 100644 --- a/vcl/workben/vcldemo.cxx +++ b/vcl/workben/vcldemo.cxx @@ -887,7 +887,7 @@ public: // An offset background for alpha rendering rDev.SetFillColor(COL_BLUE); - tools::Rectangle aSurround(r.Center(), Size(aPageShadowMask.GetSizePixel())); + tools::Rectangle aSurround(r.Center(), aPageShadowMask.GetSizePixel()); rDev.DrawRect(aSurround); rDev.DrawBitmapEx(aRenderPt, aWhole); } |