summaryrefslogtreecommitdiff
path: root/i18nlangtag
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2016-11-29 17:20:36 +0100
committerStephan Bergmann <sbergman@redhat.com>2016-11-29 17:20:36 +0100
commit1e8dc795559971eba4bdbaeff9c483ab56635b93 (patch)
treeb76e9653914309e3f99013040ae808407c2a8fa4 /i18nlangtag
parentd4864a9440ef3fecb497e1ea7018f927e2e64059 (diff)
Rewrite some (trivial) assignments inside if/while conditions: i18nlangtag
Change-Id: Ie6b8e644e01ed99559981d001a7ab95d72ffa5c2
Diffstat (limited to 'i18nlangtag')
-rw-r--r--i18nlangtag/source/languagetag/languagetag.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/i18nlangtag/source/languagetag/languagetag.cxx b/i18nlangtag/source/languagetag/languagetag.cxx
index 899ee5f08e89..11df86060d79 100644
--- a/i18nlangtag/source/languagetag/languagetag.cxx
+++ b/i18nlangtag/source/languagetag/languagetag.cxx
@@ -1779,8 +1779,8 @@ inline bool isUpperAscii( sal_Unicode c )
bool LanguageTag::isIsoLanguage( const OUString& rLanguage )
{
/* TODO: ignore case? For now let's see where rubbish is used. */
- bool b2chars;
- if (((b2chars = (rLanguage.getLength() == 2)) || rLanguage.getLength() == 3) &&
+ bool b2chars = rLanguage.getLength() == 2;
+ if ((b2chars || rLanguage.getLength() == 3) &&
isLowerAscii( rLanguage[0]) && isLowerAscii( rLanguage[1]) &&
(b2chars || isLowerAscii( rLanguage[2])))
return true;