From 1e8dc795559971eba4bdbaeff9c483ab56635b93 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Tue, 29 Nov 2016 17:20:36 +0100 Subject: Rewrite some (trivial) assignments inside if/while conditions: i18nlangtag Change-Id: Ie6b8e644e01ed99559981d001a7ab95d72ffa5c2 --- i18nlangtag/source/languagetag/languagetag.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'i18nlangtag/source/languagetag/languagetag.cxx') 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; -- cgit