diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2024-11-11 11:15:50 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2024-11-11 15:47:17 +0100 |
commit | 40afc6f25a95fba8824b60d0ced265ff80e62a4b (patch) | |
tree | 27c683752deee01a5b583c18c9abc5e546dc5b2e /desktop/source | |
parent | 08ed26c3b814896b2728b04cc006165f434e6ede (diff) |
clang-tidy: performance-unnecessary-copy-initialization in desktop
Change-Id: I0e6ce8858fc058403020e2db863730f04cac70db
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176392
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
Diffstat (limited to 'desktop/source')
-rw-r--r-- | desktop/source/deployment/manager/dp_manager.cxx | 2 | ||||
-rw-r--r-- | desktop/source/deployment/registry/help/dp_help.cxx | 5 | ||||
-rw-r--r-- | desktop/source/migration/migration.cxx | 2 |
3 files changed, 4 insertions, 5 deletions
diff --git a/desktop/source/deployment/manager/dp_manager.cxx b/desktop/source/deployment/manager/dp_manager.cxx index 99996531af5e..0e22618e04dd 100644 --- a/desktop/source/deployment/manager/dp_manager.cxx +++ b/desktop/source/deployment/manager/dp_manager.cxx @@ -411,7 +411,7 @@ Reference<deployment::XPackageManager> PackageManagerImpl::create( // Initialize logger which will be used in ProgressLogImpl (created below) rtl::Bootstrap::expandMacros(logFile); comphelper::EventLogger logger(xComponentContext, "unopkg"); - const Reference<XLogger> xLogger(logger.getLogger()); + const Reference<XLogger>& xLogger(logger.getLogger()); Reference<XLogFormatter> xLogFormatter(SimpleTextFormatter::create(xComponentContext)); Sequence < beans::NamedValue > aSeq2 { { u"Formatter"_ustr, Any(xLogFormatter) }, {u"FileURL"_ustr, Any(logFile)} }; Reference<XLogHandler> xFileHandler(css::logging::FileHandler::createWithSettings(xComponentContext, aSeq2)); diff --git a/desktop/source/deployment/registry/help/dp_help.cxx b/desktop/source/deployment/registry/help/dp_help.cxx index 936875a886eb..68882e1cd254 100644 --- a/desktop/source/deployment/registry/help/dp_help.cxx +++ b/desktop/source/deployment/registry/help/dp_help.cxx @@ -450,9 +450,8 @@ void BackendImpl::implProcessHelp( std::unique_ptr<OUString[]> pXhpFiles(new OUString[nXhpFileCount]); for( sal_Int32 iXhp = 0 ; iXhp < nXhpFileCount ; ++iXhp ) { - OUString aXhpFile = aXhpFileVector[iXhp]; - OUString aXhpRelFile = aXhpFile.copy( nLenLangFolderURL ); - pXhpFiles[iXhp] = aXhpRelFile; + const OUString& aXhpFile = aXhpFileVector[iXhp]; + pXhpFiles[iXhp] = aXhpFile.copy( nLenLangFolderURL ); } OUString aOfficeHelpPath( SvtPathOptions().GetHelpPath() ); diff --git a/desktop/source/migration/migration.cxx b/desktop/source/migration/migration.cxx index 439265546ae7..da01086b7a17 100644 --- a/desktop/source/migration/migration.cxx +++ b/desktop/source/migration/migration.cxx @@ -922,7 +922,7 @@ std::vector< MigrationModuleInfo > MigrationImpl::detectUIChangesForAllModules() uno::Sequence< OUString > lNames = xModules->getElementNames(); sal_Int32 nLength = lNames.getLength(); for (sal_Int32 i=0; i<nLength; ++i) { - OUString sModuleShortName = lNames[i]; + const OUString& sModuleShortName = lNames[i]; uno::Reference< embed::XStorage > xModule = xModules->openStorageElement(sModuleShortName, embed::ElementModes::READ); if (xModule.is()) { MigrationModuleInfo aModuleInfo; |