dbaccess/source/core/misc/DatabaseDataProvider.cxx |    2 +-
 helpcompiler/source/HelpCompiler.cxx               |    2 +-
 sc/source/ui/sparklines/SparklineList.cxx          |    2 +-
 sfx2/source/doc/Metadatable.cxx                    |    2 +-
 sfx2/source/doc/SfxDocumentMetaData.cxx            |    2 +-
 slideshow/source/engine/activitiesqueue.cxx        |    4 ++--
 vcl/source/image/ImplImageTree.cxx                 |    2 +-
 xmloff/source/chart/SchXMLExport.cxx               |    5 ++---
 8 files changed, 10 insertions(+), 11 deletions(-)

New commits:
commit 338d7b981c7fe69f579e3ac7ef31b7365a0ef160
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Sat Aug 9 12:19:04 2025 +0100
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Sat Aug 9 16:49:01 2025 +0200

    cid#1662040 Variable copied when it could be moved
    
    and
    
    cid#1660117 Variable copied when it could be moved
    cid#1659985 Variable copied when it could be moved
    cid#1659983 Variable copied when it could be moved
    cid#1659982 Variable copied when it could be moved
    cid#1659973 Variable copied when it could be moved
    cid#1659956 Variable copied when it could be moved
    cid#1659955 Variable copied when it could be moved
    
    Change-Id: Icc0f2f4a37fa8eb4c874dfd842650067c186466b
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189255
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>
    Tested-by: Caolán McNamara <caolan.mcnam...@collabora.com>

diff --git a/dbaccess/source/core/misc/DatabaseDataProvider.cxx 
b/dbaccess/source/core/misc/DatabaseDataProvider.cxx
index aa3166fd2c11..cfc3d0a55b63 100644
--- a/dbaccess/source/core/misc/DatabaseDataProvider.cxx
+++ b/dbaccess/source/core/misc/DatabaseDataProvider.cxx
@@ -759,7 +759,7 @@ void 
DatabaseDataProvider::impl_fillInternalDataProvider_throw(bool _bHasCategor
                     k = 0;
                 aRow.push_back(fDefaultData[k]);
             }
-            aDataValues.push_back(aRow);
+            aDataValues.push_back(std::move(aRow));
         }
     }
 
diff --git a/helpcompiler/source/HelpCompiler.cxx 
b/helpcompiler/source/HelpCompiler.cxx
index 1431395a8b3d..ed1b65229488 100644
--- a/helpcompiler/source/HelpCompiler.cxx
+++ b/helpcompiler/source/HelpCompiler.cxx
@@ -381,7 +381,7 @@ void myparser::traverse( xmlNodePtr parentNode )
                         trim(tmppos);
                         keyword = tmppre + ";" + tmppos;
                     }
-                    ll.push_back(keyword);
+                    ll.push_back(std::move(keyword));
                 }
                 if (!ll.empty())
                     (*keywords)[anchor] = std::move(ll);
diff --git a/sc/source/ui/sparklines/SparklineList.cxx 
b/sc/source/ui/sparklines/SparklineList.cxx
index 552ed17963b0..1d6ea93e591a 100644
--- a/sc/source/ui/sparklines/SparklineList.cxx
+++ b/sc/source/ui/sparklines/SparklineList.cxx
@@ -86,7 +86,7 @@ 
SparklineList::getSparklinesFor(std::shared_ptr<SparklineGroup> const& pSparklin
     {
         if (auto aSparkline = iterator->lock())
         {
-            toReturn.push_back(aSparkline);
+            toReturn.push_back(std::move(aSparkline));
             iterator++;
         }
         else
diff --git a/sfx2/source/doc/Metadatable.cxx b/sfx2/source/doc/Metadatable.cxx
index 6ebf62e281d6..dc61fb03b768 100644
--- a/sfx2/source/doc/Metadatable.cxx
+++ b/sfx2/source/doc/Metadatable.cxx
@@ -1455,7 +1455,7 @@ std::shared_ptr<MetadatableUndo> 
Metadatable::CreateUndo() const
 
 std::shared_ptr<MetadatableUndo> Metadatable::CreateUndoForDelete()
 {
-    std::shared_ptr<MetadatableUndo> const xUndo( CreateUndo() );
+    std::shared_ptr<MetadatableUndo> xUndo(CreateUndo());
     RemoveMetadataReference();
     return xUndo;
 }
diff --git a/sfx2/source/doc/SfxDocumentMetaData.cxx 
b/sfx2/source/doc/SfxDocumentMetaData.cxx
index 7a15713f3af7..4a3cb8d8c057 100644
--- a/sfx2/source/doc/SfxDocumentMetaData.cxx
+++ b/sfx2/source/doc/SfxDocumentMetaData.cxx
@@ -954,7 +954,7 @@ 
propsToStrings(css::uno::Reference<css::beans::XPropertySet> const & i_xPropSet)
             SAL_WARN("sfx.doc", "Unsupported property type: " << 
any.getValueTypeName() );
             continue;
         }
-        attrs.push_back(as);
+        attrs.push_back(std::move(as));
     }
 
     return std::make_pair(comphelper::containerToSequence(values), attrs);
diff --git a/slideshow/source/engine/activitiesqueue.cxx 
b/slideshow/source/engine/activitiesqueue.cxx
index d03ea8ba25f2..b38a2d38e86a 100644
--- a/slideshow/source/engine/activitiesqueue.cxx
+++ b/slideshow/source/engine/activitiesqueue.cxx
@@ -158,9 +158,9 @@ namespace slideshow::internal
                 }
 
                 if( bReinsert )
-                    maCurrentActivitiesReinsert.push_back( pActivity );
+                    
maCurrentActivitiesReinsert.push_back(std::move(pActivity));
                 else
-                    maDequeuedActivities.push_back( pActivity );
+                    maDequeuedActivities.push_back(std::move(pActivity));
 
                 SAL_INFO("slideshow.verbose", "ActivitiesQueue: inner loop 
heartbeat" );
             }
diff --git a/vcl/source/image/ImplImageTree.cxx 
b/vcl/source/image/ImplImageTree.cxx
index e39109819deb..a6cebad5caf1 100644
--- a/vcl/source/image/ImplImageTree.cxx
+++ b/vcl/source/image/ImplImageTree.cxx
@@ -189,7 +189,7 @@ void loadImageFromStream(std::shared_ptr<SvStream> const & 
xStream, OUString con
            else
         #endif
         vcl::bitmap::loadFromSvg(*xStream, rPath, aTmp, aScalePercentage / 
100.0);
-        rParameters.mrBitmap = aTmp;
+        rParameters.mrBitmap = std::move(aTmp);
 
         if (bConvertToDarkTheme)
             BitmapFilter::Filter(rParameters.mrBitmap, BitmapLightenFilter());
diff --git a/xmloff/source/chart/SchXMLExport.cxx 
b/xmloff/source/chart/SchXMLExport.cxx
index 2b2b06031bed..944d168b491b 100644
--- a/xmloff/source/chart/SchXMLExport.cxx
+++ b/xmloff/source/chart/SchXMLExport.cxx
@@ -3670,8 +3670,7 @@ void SchXMLExportHelper_Impl::exportDataPoints(
             }
 
             // if we get here the property states are empty
-            SchXMLDataPointStruct aPoint;
-            aDataPointVector.push_back( aPoint );
+            aDataPointVector.push_back(SchXMLDataPointStruct());
 
             nLastIndex = nCurrIndex;
         }
@@ -3681,7 +3680,7 @@ void SchXMLExportHelper_Impl::exportDataPoints(
         {
             SchXMLDataPointStruct aPoint;
             aPoint.mnRepeat = nRepeat;
-            aDataPointVector.push_back( aPoint );
+            aDataPointVector.push_back(std::move(aPoint));
         }
     }
 

Reply via email to