summaryrefslogtreecommitdiff
path: root/linguistic/source/misc.cxx
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 /linguistic/source/misc.cxx
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 'linguistic/source/misc.cxx')
-rw-r--r--linguistic/source/misc.cxx5
1 files changed, 2 insertions, 3 deletions
diff --git a/linguistic/source/misc.cxx b/linguistic/source/misc.cxx
index a44fb0ed10ca..4cb427d805be 100644
--- a/linguistic/source/misc.cxx
+++ b/linguistic/source/misc.cxx
@@ -610,11 +610,10 @@ CapType SAL_CALL capitalType(const OUString& aTerm, CharClass * pCC)
sal_Int32 tlen = aTerm.getLength();
if ((pCC) && (tlen))
{
- OUString aStr(aTerm);
sal_Int32 nc = 0;
for (sal_Int32 tindex = 0; tindex < tlen; ++tindex)
{
- if (pCC->getCharacterType(aStr,tindex) &
+ if (pCC->getCharacterType(aTerm,tindex) &
css::i18n::KCharacterType::UPPER) nc++;
}
@@ -622,7 +621,7 @@ CapType SAL_CALL capitalType(const OUString& aTerm, CharClass * pCC)
return CapType::NOCAP;
if (nc == tlen)
return CapType::ALLCAP;
- if ((nc == 1) && (pCC->getCharacterType(aStr,0) &
+ if ((nc == 1) && (pCC->getCharacterType(aTerm,0) &
css::i18n::KCharacterType::UPPER))
return CapType::INITCAP;