diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-09-06 08:50:58 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-09-06 09:54:25 +0200 |
commit | 24eae7bd702f3f6dd790be7ac38ac16e9fe6a375 (patch) | |
tree | 56398264184709e84517c2e843aa3a0894cc1c51 /vcl/source | |
parent | fad919eb0d30b2303193e1c00ba765514957652c (diff) |
clang-tidy performance-unnecessary-value-param
Change-Id: I69247498e13331f6ef84afeb242479f8fb1178a8
Reviewed-on: https://gerrit.libreoffice.org/60068
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/source')
-rw-r--r-- | vcl/source/app/salvtables.cxx | 3 | ||||
-rw-r--r-- | vcl/source/control/listctrl.cxx | 2 | ||||
-rw-r--r-- | vcl/source/font/Feature.cxx | 5 | ||||
-rw-r--r-- | vcl/source/gdi/gdimtf.cxx | 6 | ||||
-rw-r--r-- | vcl/source/gdi/print3.cxx | 2 |
5 files changed, 10 insertions, 8 deletions
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx index a65a973958dc..2d7b54bfbdca 100644 --- a/vcl/source/app/salvtables.cxx +++ b/vcl/source/app/salvtables.cxx @@ -32,6 +32,7 @@ #include <svdata.hxx> #include <messagedialog.hxx> #include <unotools/accessiblerelationsethelper.hxx> +#include <utility> #include <vcl/builder.hxx> #include <vcl/combobox.hxx> #include <vcl/lstbox.hxx> @@ -1875,7 +1876,7 @@ public: , m_xDrawingArea(pDrawingArea) { m_xDrawingArea->SetAccessible(rAlly); - m_xDrawingArea->SetUITestFactory(pUITestFactoryFunction, pUserData); + m_xDrawingArea->SetUITestFactory(std::move(pUITestFactoryFunction), pUserData); m_xDrawingArea->SetPaintHdl(LINK(this, SalInstanceDrawingArea, PaintHdl)); m_xDrawingArea->SetResizeHdl(LINK(this, SalInstanceDrawingArea, ResizeHdl)); m_xDrawingArea->SetMousePressHdl(LINK(this, SalInstanceDrawingArea, MousePressHdl)); diff --git a/vcl/source/control/listctrl.cxx b/vcl/source/control/listctrl.cxx index 97c16db80492..73c6b43c555d 100644 --- a/vcl/source/control/listctrl.cxx +++ b/vcl/source/control/listctrl.cxx @@ -124,7 +124,7 @@ IMPL_LINK_NOARG( ListControl, ScrollHdl, ScrollBar*, void ) DoScroll(mpScrollBar->GetDelta()); } -void ListControl::addEntry(VclPtr<Window> xEntry, sal_uInt32 nPos) +void ListControl::addEntry(const VclPtr<Window>& xEntry, sal_uInt32 nPos) { xEntry->Show(); if (nPos < maEntries.size()) diff --git a/vcl/source/font/Feature.cxx b/vcl/source/font/Feature.cxx index 7569467704ad..07810c1b011b 100644 --- a/vcl/source/font/Feature.cxx +++ b/vcl/source/font/Feature.cxx @@ -8,6 +8,7 @@ * */ +#include <utility> #include <vcl/font/Feature.hxx> #include <strings.hrc> #include <svdata.hxx> @@ -44,7 +45,7 @@ Feature::Feature(FeatureID const& rID, FeatureType eType) FeatureParameter::FeatureParameter(sal_uInt32 nCode, OUString aDescription) : m_nCode(nCode) - , m_sDescription(aDescription) + , m_sDescription(std::move(aDescription)) , m_pDescriptionID(nullptr) { } @@ -103,7 +104,7 @@ FeatureDefinition::FeatureDefinition(sal_uInt32 nCode, const char* pDescriptionI : m_nCode(nCode) , m_pDescriptionID(pDescriptionID) , m_eType(FeatureParameterType::ENUM) - , m_aEnumParameters(aEnumParameters) + , m_aEnumParameters(std::move(aEnumParameters)) { } diff --git a/vcl/source/gdi/gdimtf.cxx b/vcl/source/gdi/gdimtf.cxx index 2c6a981d1542..046f0b888bc4 100644 --- a/vcl/source/gdi/gdimtf.cxx +++ b/vcl/source/gdi/gdimtf.cxx @@ -543,7 +543,7 @@ void GDIMetaFile::WindPrev() --m_nCurrentActionElement; } -void GDIMetaFile::AddAction( rtl::Reference<MetaAction> pAction ) +void GDIMetaFile::AddAction(const rtl::Reference<MetaAction>& pAction) { m_aList.push_back( pAction ); @@ -553,7 +553,7 @@ void GDIMetaFile::AddAction( rtl::Reference<MetaAction> pAction ) } } -void GDIMetaFile::AddAction( rtl::Reference<MetaAction> pAction, size_t nPos ) +void GDIMetaFile::AddAction(const rtl::Reference<MetaAction>& pAction, size_t nPos) { if ( nPos < m_aList.size() ) { @@ -570,7 +570,7 @@ void GDIMetaFile::AddAction( rtl::Reference<MetaAction> pAction, size_t nPos ) } } -void GDIMetaFile::push_back( rtl::Reference<MetaAction> pAction ) +void GDIMetaFile::push_back(const rtl::Reference<MetaAction>& pAction) { m_aList.push_back( pAction ); } diff --git a/vcl/source/gdi/print3.cxx b/vcl/source/gdi/print3.cxx index bcffc811fc67..4a7da7d9e7d3 100644 --- a/vcl/source/gdi/print3.cxx +++ b/vcl/source/gdi/print3.cxx @@ -507,7 +507,7 @@ bool Printer::PreparePrintJob(std::shared_ptr<PrinterController> xController, return true; } -bool Printer::ExecutePrintJob(std::shared_ptr<PrinterController> xController) +bool Printer::ExecutePrintJob(const std::shared_ptr<PrinterController>& xController) { OUString aJobName; css::beans::PropertyValue* pJobNameVal = xController->getValue( OUString( "JobName" ) ); |