diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-10-06 20:29:08 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-10-08 06:34:07 +0200 |
commit | bd7cf3915964ba80786e2ae77b33fc654fde1f31 (patch) | |
tree | a153eee4572d794f391c61ba487e05772acb81cc /vcl | |
parent | 93115d2c54d645bcf2f80fde325e3ede39dee4d5 (diff) |
loplugin:moveparam in vcl
Change-Id: Ic43e02576454e3ee174304db350659dd113a1d5f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123186
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/osx/vclnsapp.mm | 8 | ||||
-rw-r--r-- | vcl/source/font/Feature.cxx | 4 | ||||
-rw-r--r-- | vcl/source/font/FeatureCollector.cxx | 5 | ||||
-rw-r--r-- | vcl/source/gdi/graphictools.cxx | 4 | ||||
-rw-r--r-- | vcl/unx/generic/gdi/gdiimpl.cxx | 8 |
5 files changed, 15 insertions, 14 deletions
diff --git a/vcl/osx/vclnsapp.mm b/vcl/osx/vclnsapp.mm index 53d002a8aa46..727f58ed391e 100644 --- a/vcl/osx/vclnsapp.mm +++ b/vcl/osx/vclnsapp.mm @@ -230,7 +230,7 @@ SAL_WNODEPRECATED_DECLARATIONS_POP aFile.push_back( GetOUString( pFile ) ); if( ! AquaSalInstance::isOnCommandLine( aFile[0] ) ) { - const ApplicationEvent* pAppEvent = new ApplicationEvent(ApplicationEvent::Type::Open, aFile); + const ApplicationEvent* pAppEvent = new ApplicationEvent(ApplicationEvent::Type::Open, std::move(aFile)); AquaSalInstance::aAppEventList.push_back( pAppEvent ); AquaSalInstance *pInst = GetSalData()->mpInstance; if( pInst ) @@ -261,7 +261,7 @@ SAL_WNODEPRECATED_DECLARATIONS_POP // we have no back channel here, we have to assume success, in which case // replyToOpenOrPrint does not need to be called according to documentation // [app replyToOpenOrPrint: NSApplicationDelegateReplySuccess]; - const ApplicationEvent* pAppEvent = new ApplicationEvent(ApplicationEvent::Type::Open, aFileList); + const ApplicationEvent* pAppEvent = new ApplicationEvent(ApplicationEvent::Type::Open, std::move(aFileList)); AquaSalInstance::aAppEventList.push_back( pAppEvent ); AquaSalInstance *pInst = GetSalData()->mpInstance; if( pInst ) @@ -274,7 +274,7 @@ SAL_WNODEPRECATED_DECLARATIONS_POP (void)app; std::vector<OUString> aFile; aFile.push_back( GetOUString( pFile ) ); - const ApplicationEvent* pAppEvent = new ApplicationEvent(ApplicationEvent::Type::Print, aFile); + const ApplicationEvent* pAppEvent = new ApplicationEvent(ApplicationEvent::Type::Print, std::move(aFile)); AquaSalInstance::aAppEventList.push_back( pAppEvent ); AquaSalInstance *pInst = GetSalData()->mpInstance; if( pInst ) @@ -296,7 +296,7 @@ SAL_WNODEPRECATED_DECLARATIONS_POP { aFileList.push_back( GetOUString( pFile ) ); } - const ApplicationEvent* pAppEvent = new ApplicationEvent(ApplicationEvent::Type::Print, aFileList); + const ApplicationEvent* pAppEvent = new ApplicationEvent(ApplicationEvent::Type::Print, std::move(aFileList)); AquaSalInstance::aAppEventList.push_back( pAppEvent ); AquaSalInstance *pInst = GetSalData()->mpInstance; if( pInst ) diff --git a/vcl/source/font/Feature.cxx b/vcl/source/font/Feature.cxx index 3a8c20b2c915..ba4b09a5def0 100644 --- a/vcl/source/font/Feature.cxx +++ b/vcl/source/font/Feature.cxx @@ -96,13 +96,13 @@ FeatureDefinition::FeatureDefinition() FeatureDefinition::FeatureDefinition(uint32_t nCode, OUString const& rDescription, FeatureParameterType eType, - std::vector<FeatureParameter> const& rEnumParameters, + std::vector<FeatureParameter>&& rEnumParameters, uint32_t nDefault) : m_sDescription(rDescription) , m_nCode(nCode) , m_nDefault(nDefault) , m_eType(eType) - , m_aEnumParameters(rEnumParameters) + , m_aEnumParameters(std::move(rEnumParameters)) { } diff --git a/vcl/source/font/FeatureCollector.cxx b/vcl/source/font/FeatureCollector.cxx index e8219b07c328..6448860f9998 100644 --- a/vcl/source/font/FeatureCollector.cxx +++ b/vcl/source/font/FeatureCollector.cxx @@ -73,8 +73,9 @@ bool FeatureCollector::collectGraphite() FeatureID{ nFeatureCode, HB_OT_TAG_DEFAULT_SCRIPT, HB_OT_TAG_DEFAULT_LANGUAGE }, vcl::font::FeatureType::Graphite); vcl::font::Feature& rFeature = m_rFontFeatures.back(); - rFeature.m_aDefinition = vcl::font::FeatureDefinition( - nFeatureCode, sLabel, eFeatureParameterType, aParameters, sal_uInt32(nValue)); + rFeature.m_aDefinition + = vcl::font::FeatureDefinition(nFeatureCode, sLabel, eFeatureParameterType, + std::move(aParameters), sal_uInt32(nValue)); } } gr_featureval_destroy(pfeatureValues); diff --git a/vcl/source/gdi/graphictools.cxx b/vcl/source/gdi/graphictools.cxx index 1a2442d1b2d2..b14f4263cfcb 100644 --- a/vcl/source/gdi/graphictools.cxx +++ b/vcl/source/gdi/graphictools.cxx @@ -45,7 +45,7 @@ SvtGraphicStroke::SvtGraphicStroke( const tools::Polygon& rPath, CapType aCap, JoinType aJoin, double fMiterLimit, - const DashArray& rDashArray ) : + DashArray&& rDashArray ) : maPath( rPath ), maStartArrow( rStartArrow ), maEndArrow( rEndArrow ), @@ -54,7 +54,7 @@ SvtGraphicStroke::SvtGraphicStroke( const tools::Polygon& rPath, maCapType( aCap ), maJoinType( aJoin ), mfMiterLimit( fMiterLimit ), - maDashArray( rDashArray ) + maDashArray( std::move(rDashArray) ) { } diff --git a/vcl/unx/generic/gdi/gdiimpl.cxx b/vcl/unx/generic/gdi/gdiimpl.cxx index ceeaa1d55203..53226821b4a1 100644 --- a/vcl/unx/generic/gdi/gdiimpl.cxx +++ b/vcl/unx/generic/gdi/gdiimpl.cxx @@ -1602,7 +1602,7 @@ private: public: SystemDependentData_Triangulation( basegfx::SystemDependentDataManager& rSystemDependentDataManager, - const basegfx::triangulator::B2DTriangleVector& rTriangles, + basegfx::triangulator::B2DTriangleVector&& rTriangles, double fLineWidth, basegfx::B2DLineJoin eJoin, css::drawing::LineCap eCap, @@ -1624,14 +1624,14 @@ public: SystemDependentData_Triangulation::SystemDependentData_Triangulation( basegfx::SystemDependentDataManager& rSystemDependentDataManager, - const basegfx::triangulator::B2DTriangleVector& rTriangles, + basegfx::triangulator::B2DTriangleVector&& rTriangles, double fLineWidth, basegfx::B2DLineJoin eJoin, css::drawing::LineCap eCap, double fMiterMinimumAngle, const std::vector< double >* pStroke) : basegfx::SystemDependentData(rSystemDependentDataManager), - maTriangles(rTriangles), + maTriangles(std::move(rTriangles)), mfLineWidth(fLineWidth), meJoin(eJoin), meCap(eCap), @@ -1824,7 +1824,7 @@ bool X11SalGraphicsImpl::drawPolyLine( // validity (see above) pSystemDependentData_Triangulation = rPolygon.addOrReplaceSystemDependentData<SystemDependentData_Triangulation>( ImplGetSystemDependentDataManager(), - aTriangles, + std::move(aTriangles), fLineWidth, eLineJoin, eLineCap, |