diff options
author | Noel Grandin <noel@peralex.com> | 2016-04-12 16:39:03 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-04-18 07:37:31 +0000 |
commit | 789055bc2acb4c71483fd60ea258d158bd5aec10 (patch) | |
tree | 7849de841a71f667a30b2a971ad0c3d406110396 /sw/source/uibase/fldui/fldmgr.cxx | |
parent | 150ac9cf05ed9da6a2af5bc3f820280fd853e519 (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 'sw/source/uibase/fldui/fldmgr.cxx')
-rw-r--r-- | sw/source/uibase/fldui/fldmgr.cxx | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sw/source/uibase/fldui/fldmgr.cxx b/sw/source/uibase/fldui/fldmgr.cxx index f2119ac00909..38b413ad1770 100644 --- a/sw/source/uibase/fldui/fldmgr.cxx +++ b/sw/source/uibase/fldui/fldmgr.cxx @@ -1383,7 +1383,6 @@ void SwFieldMgr::UpdateCurField(sal_uLong nFormat, bool bSetPar2 = true; bool bSetPar1 = true; - OUString sPar1( rPar1 ); OUString sPar2( rPar2 ); // Order to Format @@ -1472,7 +1471,7 @@ void SwFieldMgr::UpdateCurField(sal_uLong nFormat, for(sal_Int32 nToken = 0; nToken < nTokenCount; nToken++) pArray[nToken] = sPar2.getToken(nToken, DB_DELIM); static_cast<SwDropDownField*>(pTmpField)->SetItems(aEntries); - static_cast<SwDropDownField*>(pTmpField)->SetName(sPar1); + static_cast<SwDropDownField*>(pTmpField)->SetName(rPar1); bSetPar1 = bSetPar2 = false; } break; @@ -1503,8 +1502,8 @@ void SwFieldMgr::UpdateCurField(sal_uLong nFormat, // setup format before SetPar2 because of NumberFormatter! pTmpField->ChangeFormat(nFormat); - if(bSetPar1) - pTmpField->SetPar1( sPar1 ); + if( bSetPar1 ) + pTmpField->SetPar1( rPar1 ); if( bSetPar2 ) pTmpField->SetPar2( sPar2 ); |