[Libreoffice-commits] core.git: include/vcl sfx2/source vcl/osx vcl/source vcl/unx

Noel Grandin (via logerrit) logerrit at kemper.freedesktop.org
Fri Oct 8 04:34:42 UTC 2021


 include/vcl/font/Feature.hxx         |    2 +-
 include/vcl/graphictools.hxx         |    2 +-
 include/vcl/svapp.hxx                |    4 ++--
 sfx2/source/appl/appdde.cxx          |    2 +-
 vcl/osx/vclnsapp.mm                  |    8 ++++----
 vcl/source/font/Feature.cxx          |    4 ++--
 vcl/source/font/FeatureCollector.cxx |    5 +++--
 vcl/source/gdi/graphictools.cxx      |    4 ++--
 vcl/unx/generic/gdi/gdiimpl.cxx      |    8 ++++----
 9 files changed, 20 insertions(+), 19 deletions(-)

New commits:
commit bd7cf3915964ba80786e2ae77b33fc654fde1f31
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Wed Oct 6 20:29:08 2021 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Fri Oct 8 06:34:07 2021 +0200

    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 at collabora.co.uk>

diff --git a/include/vcl/font/Feature.hxx b/include/vcl/font/Feature.hxx
index b16843abea7d..3026f105fbfb 100644
--- a/include/vcl/font/Feature.hxx
+++ b/include/vcl/font/Feature.hxx
@@ -68,7 +68,7 @@ public:
     FeatureDefinition();
     FeatureDefinition(uint32_t nCode, OUString const& rDescription,
                       FeatureParameterType eType = FeatureParameterType::BOOL,
-                      std::vector<FeatureParameter> const& rEnumParameters
+                      std::vector<FeatureParameter>&& rEnumParameters
                       = std::vector<FeatureParameter>{},
                       uint32_t nDefault = 0);
     FeatureDefinition(uint32_t nCode, TranslateId pDescriptionID,
diff --git a/include/vcl/graphictools.hxx b/include/vcl/graphictools.hxx
index 90dcbc360d1d..932df413cc58 100644
--- a/include/vcl/graphictools.hxx
+++ b/include/vcl/graphictools.hxx
@@ -84,7 +84,7 @@ public:
                       CapType               aCap,
                       JoinType              aJoin,
                       double                fMiterLimit,
-                      const DashArray&      rDashArray  );      // TODO: Dash array offset (position where to start, see PS)
+                      DashArray&&           rDashArray  );      // TODO: Dash array offset (position where to start, see PS)
 
     // accessors
     /// Query path to stroke
diff --git a/include/vcl/svapp.hxx b/include/vcl/svapp.hxx
index 519aad8bb27b..e422c47c66ad 100644
--- a/include/vcl/svapp.hxx
+++ b/include/vcl/svapp.hxx
@@ -161,8 +161,8 @@ public:
         and are the \em only events that accept an array of strings. No other
         events should use this constructor.
     */
-    ApplicationEvent(Type type, std::vector<OUString> const & data):
-        aEvent(type), aData(data)
+    ApplicationEvent(Type type, std::vector<OUString>&& data):
+        aEvent(type), aData(std::move(data))
     {
         assert(type == Type::Open || type == Type::Print);
     }
diff --git a/sfx2/source/appl/appdde.cxx b/sfx2/source/appl/appdde.cxx
index 2144cf5d9cc5..b5c6ee54b6fc 100644
--- a/sfx2/source/appl/appdde.cxx
+++ b/sfx2/source/appl/appdde.cxx
@@ -282,7 +282,7 @@ bool SfxAppEvent_Impl( const OUString& rCmd, std::u16string_view rEvent,
                 }
             }
 
-            GetpApp()->AppEvent( ApplicationEvent(eType, aData) );
+            GetpApp()->AppEvent( ApplicationEvent(eType, std::move(aData)) );
             return true;
         }
     }
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,


More information about the Libreoffice-commits mailing list