From 789055bc2acb4c71483fd60ea258d158bd5aec10 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 12 Apr 2016 16:39:03 +0200 Subject: clang-tidy performance-unnecessary-copy-initialization probably not much performance benefit, but it sure is good at identifying leftover intermediate variables from previous refactorings. Change-Id: I3ce16fe496ac2733c1cb0a35f74c0fc9193cc657 Reviewed-on: https://gerrit.libreoffice.org/24026 Reviewed-by: Noel Grandin Tested-by: Noel Grandin --- basctl/source/basicide/basides1.cxx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'basctl') diff --git a/basctl/source/basicide/basides1.cxx b/basctl/source/basicide/basides1.cxx index 23e25cb7a3ea..926c9ad4f918 100644 --- a/basctl/source/basicide/basides1.cxx +++ b/basctl/source/basicide/basides1.cxx @@ -304,7 +304,7 @@ void Shell::ExecuteGlobal( SfxRequest& rReq ) { if ( !rInfo.GetModule().isEmpty() || pBasic->GetModules().empty() ) { - OUString aModName = rInfo.GetModule(); + const OUString& aModName = rInfo.GetModule(); OUString sModuleCode; if ( aDocument.createModule( aLibName, aModName, false, sModuleCode ) ) @@ -505,9 +505,9 @@ void Shell::ExecuteGlobal( SfxRequest& rReq ) { DBG_ASSERT( rReq.GetArgs(), "arguments expected" ); const SbxItem& rSbxItem = static_cast(rReq.GetArgs()->Get(SID_BASICIDE_ARG_SBX )); - ScriptDocument aDocument( rSbxItem.GetDocument() ); - OUString aLibName( rSbxItem.GetLibName() ); - OUString aName( rSbxItem.GetName() ); + const ScriptDocument& aDocument( rSbxItem.GetDocument() ); + const OUString& aLibName( rSbxItem.GetLibName() ); + const OUString& aName( rSbxItem.GetName() ); if ( m_aCurLibName.isEmpty() || ( aDocument == m_aCurDocument && aLibName == m_aCurLibName ) ) { if ( rSbxItem.GetType() == TYPE_MODULE ) @@ -521,7 +521,7 @@ void Shell::ExecuteGlobal( SfxRequest& rReq ) { DBG_ASSERT( rReq.GetArgs(), "arguments expected" ); const SbxItem& rSbxItem = static_cast(rReq.GetArgs()->Get(SID_BASICIDE_ARG_SBX )); - ScriptDocument aDocument( rSbxItem.GetDocument() ); + const ScriptDocument& aDocument( rSbxItem.GetDocument() ); BaseWindow* pWin = FindWindow( aDocument, rSbxItem.GetLibName(), rSbxItem.GetName(), rSbxItem.GetType(), true ); if ( pWin ) RemoveWindow( pWin, true ); @@ -531,9 +531,9 @@ void Shell::ExecuteGlobal( SfxRequest& rReq ) { DBG_ASSERT( rReq.GetArgs(), "arguments expected" ); const SbxItem& rSbxItem = static_cast(rReq.GetArgs()->Get(SID_BASICIDE_ARG_SBX )); - ScriptDocument aDocument( rSbxItem.GetDocument() ); - OUString aLibName( rSbxItem.GetLibName() ); - OUString aName( rSbxItem.GetName() ); + const ScriptDocument& aDocument( rSbxItem.GetDocument() ); + const OUString& aLibName( rSbxItem.GetLibName() ); + const OUString& aName( rSbxItem.GetName() ); SetCurLib( aDocument, aLibName ); BaseWindow* pWin = nullptr; if ( rSbxItem.GetType() == TYPE_DIALOG ) -- cgit