summaryrefslogtreecommitdiff
path: root/i18npool
diff options
context:
space:
mode:
authorArkadiy Illarionov <qarkai@gmail.com>2019-10-20 11:57:11 +0300
committerArkadiy Illarionov <qarkai@gmail.com>2019-10-20 11:46:05 +0200
commita2b46aa93fe1ce1d98e8fed5a0987b106aeacec8 (patch)
tree23078267af7f21c11ae16133cd039e554f1866d6 /i18npool
parentb67af57b98bfccc6d1a9671bb3428194c6cf6ce8 (diff)
Drop redundant conditions
nMappingType is checked in lcl_getMappingTypeForToggleCase Change-Id: I5e13ffad9028ca40d23e5ca19d765b3ee43c5724 Reviewed-on: https://gerrit.libreoffice.org/81151 Tested-by: Jenkins Reviewed-by: Arkadiy Illarionov <qarkai@gmail.com>
Diffstat (limited to 'i18npool')
-rw-r--r--i18npool/source/transliteration/transliteration_body.cxx12
1 files changed, 3 insertions, 9 deletions
diff --git a/i18npool/source/transliteration/transliteration_body.cxx b/i18npool/source/transliteration/transliteration_body.cxx
index a320b46d36aa..6d6c710b57c2 100644
--- a/i18npool/source/transliteration/transliteration_body.cxx
+++ b/i18npool/source/transliteration/transliteration_body.cxx
@@ -100,9 +100,7 @@ Transliteration_body::transliterateImpl(
for (i = 0; i < nCount; i++)
{
// take care of TOGGLE_CASE transliteration:
- MappingType nTmpMappingType = nMappingType;
- if (nMappingType == (MappingType::LowerToUpper | MappingType::UpperToLower))
- nTmpMappingType = lcl_getMappingTypeForToggleCase( nMappingType, in[i] );
+ MappingType nTmpMappingType = lcl_getMappingTypeForToggleCase( nMappingType, in[i] );
const i18nutil::Mapping &map = i18nutil::casefolding::getValue( in, i, nCount, aLocale, nTmpMappingType );
nOffCount += map.nmap;
@@ -118,9 +116,7 @@ Transliteration_body::transliterateImpl(
for (i = 0; i < nCount; i++)
{
// take care of TOGGLE_CASE transliteration:
- MappingType nTmpMappingType = nMappingType;
- if (nMappingType == (MappingType::LowerToUpper | MappingType::UpperToLower))
- nTmpMappingType = lcl_getMappingTypeForToggleCase( nMappingType, in[i] );
+ MappingType nTmpMappingType = lcl_getMappingTypeForToggleCase( nMappingType, in[i] );
const i18nutil::Mapping &map = i18nutil::casefolding::getValue( in, i, nCount, aLocale, nTmpMappingType );
for (sal_Int32 k = 0; k < map.nmap; k++)
@@ -158,9 +154,7 @@ Transliteration_body::transliterateImpl(
for ( sal_Int32 i = 0; i < nCount; i++)
{
// take care of TOGGLE_CASE transliteration:
- MappingType nTmpMappingType = nMappingType;
- if (nMappingType == (MappingType::LowerToUpper | MappingType::UpperToLower))
- nTmpMappingType = lcl_getMappingTypeForToggleCase( nMappingType, in[i] );
+ MappingType nTmpMappingType = lcl_getMappingTypeForToggleCase( nMappingType, in[i] );
const i18nutil::Mapping &map = i18nutil::casefolding::getValue( in, i, nCount, aLocale, nTmpMappingType );
for (sal_Int32 k = 0; k < map.nmap; k++)