diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-04-22 21:40:50 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-04-22 20:50:54 +0000 |
commit | 1a31dd5ec4ede142044eb58d2d1e03709a6d12cd (patch) | |
tree | 17b04e5622bfab63ce46098bf8ad4a5dc4200d26 /i18npool | |
parent | bac01f8af744ae4f6853fcafa53fce1eadb8f361 (diff) |
Clean up odd sal::static_int_cast<sal_Bool> uses
Change-Id: Idbd1cdb06315b96dc9f45e34108a1af45229ed2f
Reviewed-on: https://gerrit.libreoffice.org/15484
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'i18npool')
-rw-r--r-- | i18npool/source/breakiterator/xdictionary.cxx | 2 | ||||
-rw-r--r-- | i18npool/source/localedata/localedata.cxx | 7 |
2 files changed, 4 insertions, 5 deletions
diff --git a/i18npool/source/breakiterator/xdictionary.cxx b/i18npool/source/breakiterator/xdictionary.cxx index 5f14995c4cd2..ec9f63097b78 100644 --- a/i18npool/source/breakiterator/xdictionary.cxx +++ b/i18npool/source/breakiterator/xdictionary.cxx @@ -196,7 +196,7 @@ void xdictionary::setJapaneseWordBreak() bool xdictionary::exists(const sal_uInt32 c) { // 0x1FFF is the hardcoded limit in gendict for data.existMarks - bool exist = (data.existMark && ((c>>3) < 0x1FFF)) ? sal::static_int_cast<sal_Bool>((data.existMark[c>>3] & (1<<(c&0x07))) != 0) : sal_False; + bool exist = data.existMark && (c>>3) < 0x1FFF && (data.existMark[c>>3] & (1<<(c&0x07))) != 0; if (!exist && japaneseWordBreak) return BreakIteratorImpl::getScriptClass(c) == ScriptType::ASIAN; else diff --git a/i18npool/source/localedata/localedata.cxx b/i18npool/source/localedata/localedata.cxx index 56d8fc88b7b3..4ab8cd2a6b1e 100644 --- a/i18npool/source/localedata/localedata.cxx +++ b/i18npool/source/localedata/localedata.cxx @@ -710,7 +710,7 @@ LocaleDataImpl::getAllCalendars2( const Locale& rLocale ) throw(RuntimeException for(sal_Int16 i = 0; i < calendarsCount; i++) { OUString calendarID(allCalendars[offset]); offset++; - bool defaultCalendar = sal::static_int_cast<sal_Bool>( allCalendars[offset][0] ); + bool defaultCalendar = allCalendars[offset][0] != 0; offset++; Sequence< CalendarItem2 > days = getCalendarItems( allCalendars, offset, REF_DAYS, i, rLocale, calendarsSeq); @@ -879,7 +879,7 @@ LocaleDataImpl::getAllFormats( const Locale& rLocale ) throw(RuntimeException, s formatArray[nOff + 3], formatArray[nOff + 4], formatArray[nOff + 5][0], - sal::static_int_cast<sal_Bool>(formatArray[nOff + 6][0])); + formatArray[nOff + 6][0] != 0); seq[f] = elem; } } @@ -943,8 +943,7 @@ LocaleDataImpl::getCollatorImplementations( const Locale& rLocale ) throw(Runtim Sequence< Implementation > seq(collatorCount); for(sal_Int16 i = 0; i < collatorCount; i++) { Implementation impl(collatorArray[i * COLLATOR_ELEMENTS + COLLATOR_OFFSET_ALGO], - sal::static_int_cast<sal_Bool>( - collatorArray[i * COLLATOR_ELEMENTS + COLLATOR_OFFSET_DEFAULT][0])); + collatorArray[i * COLLATOR_ELEMENTS + COLLATOR_OFFSET_DEFAULT][0] != 0); seq[i] = impl; } return seq; |