[Libreoffice-commits] core.git: i18npool/source
Arkadiy Illarionov (via logerrit)
logerrit at kemper.freedesktop.org
Sun Oct 20 09:46:54 UTC 2019
i18npool/source/transliteration/transliteration_body.cxx | 12 +++---------
1 file changed, 3 insertions(+), 9 deletions(-)
New commits:
commit a2b46aa93fe1ce1d98e8fed5a0987b106aeacec8
Author: Arkadiy Illarionov <qarkai at gmail.com>
AuthorDate: Sun Oct 20 11:57:11 2019 +0300
Commit: Arkadiy Illarionov <qarkai at gmail.com>
CommitDate: Sun Oct 20 11:46:05 2019 +0200
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 at gmail.com>
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++)
More information about the Libreoffice-commits
mailing list