diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2018-01-15 09:04:56 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2018-01-15 09:04:56 +0100 |
commit | ac37cb32df769c669d51639b12e6a45dc3962cf7 (patch) | |
tree | c9e563af79826da05545849f8e66bdd62289290d /i18nutil/source/utility/casefolding.cxx | |
parent | e99d632b10ac1ba46ee6e7a0723f331a25ec9184 (diff) |
More loplugin:cstylecast: i18nutil
Change-Id: Ibdfec3e35c6424fdd4d9b15ff4f4d7441a5f7e36
Diffstat (limited to 'i18nutil/source/utility/casefolding.cxx')
-rw-r--r-- | i18nutil/source/utility/casefolding.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/i18nutil/source/utility/casefolding.cxx b/i18nutil/source/utility/casefolding.cxx index cc5eda68e8ee..0d957c0a91b6 100644 --- a/i18nutil/source/utility/casefolding.cxx +++ b/i18nutil/source/utility/casefolding.cxx @@ -50,7 +50,7 @@ static bool cased_letter(sal_Unicode ch) if (cmi < 0) return false; int cmv_idx = (cmi << 8) + (ch & 0xff); - return bool(((MappingType)CaseMappingValue[cmv_idx].type) & MappingType::CasedLetterMask); + return bool(static_cast<MappingType>(CaseMappingValue[cmv_idx].type) & MappingType::CasedLetterMask); } // for Lithuanian, condition to make explicit dot above when lowercasing capital I's and J's @@ -95,16 +95,16 @@ Mapping& casefolding::getValue(const sal_Unicode* str, sal_Int32 pos, sal_Int32 if (address >= 0) { address = (address << 8) + (str[pos] & 0xFF); - if ((MappingType)CaseMappingValue[address].type & nMappingType) { - MappingType type = (MappingType) CaseMappingValue[address].type; + if (static_cast<MappingType>(CaseMappingValue[address].type) & nMappingType) { + MappingType type = static_cast<MappingType>(CaseMappingValue[address].type); if (type & MappingType::NotValue) { if (CaseMappingValue[address].value == 0) return getConditionalValue(str, pos, len, aLocale, nMappingType); else { for (int map = CaseMappingValue[address].value; map < CaseMappingValue[address].value + MaxCaseMappingExtras; map++) { - if ((MappingType)CaseMappingExtra[map].type & nMappingType) { - if ((MappingType)CaseMappingExtra[map].type & MappingType::NotValue) + if (static_cast<MappingType>(CaseMappingExtra[map].type) & nMappingType) { + if (static_cast<MappingType>(CaseMappingExtra[map].type) & MappingType::NotValue) return getConditionalValue(str, pos, len, aLocale, nMappingType); else return CaseMappingExtra[map]; |