summaryrefslogtreecommitdiff
path: root/i18nutil
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2020-04-15 09:04:38 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-04-15 19:25:23 +0200
commit4cc702a7055c0e12c7cbf5e5e359e7cbc8b88020 (patch)
treef09f7167cdca22f16edb5a998c2f9714e4bdc698 /i18nutil
parent393aa2b3dee9cca84a215635060b369a962ab179 (diff)
loplugin:buriedassign in f,h,i*
Change-Id: Iac753e528e13cb2565832a484e87f88061bbc91e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92239 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'i18nutil')
-rw-r--r--i18nutil/source/utility/casefolding.cxx7
-rw-r--r--i18nutil/source/utility/unicode.cxx14
2 files changed, 13 insertions, 8 deletions
diff --git a/i18nutil/source/utility/casefolding.cxx b/i18nutil/source/utility/casefolding.cxx
index cf3a716701e3..57a6a23bc561 100644
--- a/i18nutil/source/utility/casefolding.cxx
+++ b/i18nutil/source/utility/casefolding.cxx
@@ -135,9 +135,10 @@ Mapping casefolding::getValue(const sal_Unicode* str, sal_Int32 pos, sal_Int32 l
static bool
is_ja_voice_sound_mark(sal_Unicode& current, sal_Unicode next)
{
- sal_Unicode c = 0;
-
- if ((next == 0x3099 || next == 0x309a) && ( (c = widthfolding::getCompositionChar(current, next)) != 0 ))
+ if (!(next == 0x3099 || next == 0x309a))
+ return false;
+ sal_Unicode c = widthfolding::getCompositionChar(current, next);
+ if (c != 0)
current = c;
return c != 0;
}
diff --git a/i18nutil/source/utility/unicode.cxx b/i18nutil/source/utility/unicode.cxx
index 95b455683833..4e0a0e45e126 100644
--- a/i18nutil/source/utility/unicode.cxx
+++ b/i18nutil/source/utility/unicode.cxx
@@ -73,8 +73,11 @@ unicode::getUnicodeType( const sal_Unicode ch ) {
else c = ch;
sal_Int16 address = UnicodeTypeIndex[ch >> 8];
- return r = static_cast<sal_Int16>((address < UnicodeTypeNumberBlock) ? UnicodeTypeBlockValue[address] :
- UnicodeTypeValue[((address - UnicodeTypeNumberBlock) << 8) + (ch & 0xff)]);
+ r = static_cast<sal_Int16>(
+ (address < UnicodeTypeNumberBlock)
+ ? UnicodeTypeBlockValue[address]
+ : UnicodeTypeValue[((address - UnicodeTypeNumberBlock) << 8) + (ch & 0xff)]);
+ return r;
}
sal_uInt8
@@ -86,9 +89,10 @@ unicode::getUnicodeDirection( const sal_Unicode ch ) {
else c = ch;
sal_Int16 address = UnicodeDirectionIndex[ch >> 8];
- return r = ((address < UnicodeDirectionNumberBlock) ? UnicodeDirectionBlockValue[address] :
- UnicodeDirectionValue[((address - UnicodeDirectionNumberBlock) << 8) + (ch & 0xff)]);
-
+ r = (address < UnicodeDirectionNumberBlock)
+ ? UnicodeDirectionBlockValue[address]
+ : UnicodeDirectionValue[((address - UnicodeDirectionNumberBlock) << 8) + (ch & 0xff)];
+ return r;
}
#define bit(name) (1U << name)