summaryrefslogtreecommitdiff
path: root/formula
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 /formula
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 'formula')
-rw-r--r--formula/source/ui/dlg/FormulaHelper.cxx3
-rw-r--r--formula/source/ui/dlg/funcpage.cxx4
2 files changed, 2 insertions, 5 deletions
diff --git a/formula/source/ui/dlg/FormulaHelper.cxx b/formula/source/ui/dlg/FormulaHelper.cxx
index 73a5dd695292..2ffe25e35c0c 100644
--- a/formula/source/ui/dlg/FormulaHelper.cxx
+++ b/formula/source/ui/dlg/FormulaHelper.cxx
@@ -91,7 +91,6 @@ bool FormulaHelper::GetNextFunc( const OUString& rFormula,
if ( ppFDesc )
{
*ppFDesc = nullptr;
- const OUString sTemp( aFname );
const sal_uInt32 nCategoryCount = m_pFunctionManager->getCount();
for(sal_uInt32 j= 0; j < nCategoryCount && !*ppFDesc; ++j)
{
@@ -100,7 +99,7 @@ bool FormulaHelper::GetNextFunc( const OUString& rFormula,
for(sal_uInt32 i = 0 ; i < nCount; ++i)
{
const IFunctionDescription* pCurrent = pCategory->getFunction(i);
- if ( pCurrent->getFunctionName().equalsIgnoreAsciiCase(sTemp) )
+ if ( pCurrent->getFunctionName().equalsIgnoreAsciiCase(aFname) )
{
*ppFDesc = pCurrent;
break;
diff --git a/formula/source/ui/dlg/funcpage.cxx b/formula/source/ui/dlg/funcpage.cxx
index d629ca3bea3f..77bf5167536b 100644
--- a/formula/source/ui/dlg/funcpage.cxx
+++ b/formula/source/ui/dlg/funcpage.cxx
@@ -38,9 +38,7 @@ FormulaListBox::FormulaListBox( vcl::Window* pParent, WinBits nBits ):
void FormulaListBox::KeyInput( const KeyEvent& rKEvt )
{
- KeyEvent aKEvt=rKEvt;
-
- if(aKEvt.GetCharCode()==' ')
+ if(rKEvt.GetCharCode()==' ')
DoubleClick();
}