jvmfwk/source/framework.cxx                |    4 ++--
 linguistic/source/gciterator.cxx           |    3 +--
 lotuswordpro/source/filter/lwpfribmark.cxx |    2 +-
 pyuno/source/module/pyuno_module.cxx       |    2 +-
 4 files changed, 5 insertions(+), 6 deletions(-)

New commits:
commit 2cb43c6b88931beedd506b33bb77ca8089ba7094
Author:     Noel Grandin <[email protected]>
AuthorDate: Mon Nov 11 19:33:13 2024 +0200
Commit:     Noel Grandin <[email protected]>
CommitDate: Mon Nov 11 21:02:55 2024 +0100

    clang-tidy: performance-unnecessary-copy-initialization in various
    
    Change-Id: Ib7d75d4d8207261898568402e7983e0f11da14bf
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176417
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <[email protected]>

diff --git a/jvmfwk/source/framework.cxx b/jvmfwk/source/framework.cxx
index a20d08fd1a99..0fe6ed7903c4 100644
--- a/jvmfwk/source/framework.cxx
+++ b/jvmfwk/source/framework.cxx
@@ -89,7 +89,7 @@ javaFrameworkError 
jfw_findAllJREs(std::vector<std::unique_ptr<JavaInfo>> *pparI
             //get the list of paths to jre locations which have been
             //added manually
             const jfw::MergedSettings settings;
-            const std::vector<OUString> vecJRELocations =
+            const std::vector<OUString>& vecJRELocations =
                 settings.getJRELocations();
             //Check if any plugin can detect JREs at the location
             // of the paths added by jfw_addJRELocation
@@ -230,7 +230,7 @@ javaFrameworkError jfw_startVM(
 
                 vmParams = settings.getVmParametersUtf8();
                 // Expand user classpath (might contain bootstrap vars)
-                OUString sUserPath(settings.getUserClassPath());
+                const OUString& sUserPath(settings.getUserClassPath());
                 std::vector paths = jfw_convertUserPathList(sUserPath);
                 OUString sUserPathExpanded;
                 for (auto& path : paths)
diff --git a/linguistic/source/gciterator.cxx b/linguistic/source/gciterator.cxx
index cabef14c94ab..5a253752f4a3 100644
--- a/linguistic/source/gciterator.cxx
+++ b/linguistic/source/gciterator.cxx
@@ -1138,8 +1138,7 @@ void GrammarCheckingIterator::GetConfiguredGCSvcs_Impl()
                 if (aImplNames.hasElements())
                 {
                     // only the first entry is used, there should be only one 
grammar checker per language
-                    const OUString aImplName( aImplNames[0] );
-                    aTmpGCImplNamesByLang[rElementName] = aImplName;
+                    aTmpGCImplNamesByLang[rElementName] = aImplNames[0];
                 }
             }
             else
diff --git a/lotuswordpro/source/filter/lwpfribmark.cxx 
b/lotuswordpro/source/filter/lwpfribmark.cxx
index 56c2f86a9234..ac38fb3dbab7 100644
--- a/lotuswordpro/source/filter/lwpfribmark.cxx
+++ b/lotuswordpro/source/filter/lwpfribmark.cxx
@@ -363,7 +363,7 @@ void LwpFribField::RegisterStyle(LwpFoundry* pFoundry)
 
 void LwpFribField::RegisterTimeField(const LwpFieldMark* pFieldMark)
 {
-    OUString sFormula
+    const OUString& sFormula
         = pFieldMark->GetFormula(); //now bookmark maybe not all register to 
bookmarkmgr,
     if (sFormula == "TotalEditingTime") //so check field type now is not 
correct.
         RegisterTotalTimeStyle();
diff --git a/pyuno/source/module/pyuno_module.cxx 
b/pyuno/source/module/pyuno_module.cxx
index 195382810674..e2edfeb601cd 100644
--- a/pyuno/source/module/pyuno_module.cxx
+++ b/pyuno/source/module/pyuno_module.cxx
@@ -238,7 +238,7 @@ static PyObject* getComponentContext(
         Reference<XComponentContext> ctx;
 
         // getLibDir() must be called in order to set bootstrap variables 
correctly !
-        OUString path( getLibDir());
+        const OUString& path( getLibDir());
         if( Runtime::isInitialized() )
         {
             Runtime runtime;

Reply via email to