summaryrefslogtreecommitdiff
path: root/basctl
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-04-12 16:39:03 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-04-18 07:37:31 +0000
commit789055bc2acb4c71483fd60ea258d158bd5aec10 (patch)
tree7849de841a71f667a30b2a971ad0c3d406110396 /basctl
parent150ac9cf05ed9da6a2af5bc3f820280fd853e519 (diff)
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 <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'basctl')
-rw-r--r--basctl/source/basicide/basides1.cxx16
1 files changed, 8 insertions, 8 deletions
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<const SbxItem&>(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<const SbxItem&>(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<const SbxItem&>(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 )