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 /dbaccess/source/ui/control | |
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 'dbaccess/source/ui/control')
-rw-r--r-- | dbaccess/source/ui/control/SqlNameEdit.cxx | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/dbaccess/source/ui/control/SqlNameEdit.cxx b/dbaccess/source/ui/control/SqlNameEdit.cxx index 2816c9866241..5c025afd9655 100644 --- a/dbaccess/source/ui/control/SqlNameEdit.cxx +++ b/dbaccess/source/ui/control/SqlNameEdit.cxx @@ -38,18 +38,17 @@ namespace dbaui bool bCorrected = false; if ( m_bCheck ) { - OUString sText = _sToCheck; sal_Int32 nMatch = 0; - for (sal_Int32 i = nMatch; i < sText.getLength(); ++i) + for (sal_Int32 i = nMatch; i < _sToCheck.getLength(); ++i) { - if ( !isCharOk( sText[i], i == 0, m_bOnlyUpperCase, m_sAllowedChars ) ) + if ( !isCharOk( _sToCheck[i], i == 0, m_bOnlyUpperCase, m_sAllowedChars ) ) { - _rsCorrected += sText.copy(nMatch, i - nMatch); + _rsCorrected += _sToCheck.copy(nMatch, i - nMatch); bCorrected = true; nMatch = i + 1; } } - _rsCorrected += sText.copy( nMatch, sText.getLength() - nMatch ); + _rsCorrected += _sToCheck.copy( nMatch, _sToCheck.getLength() - nMatch ); } return bCorrected; } |