diff options
author | Noel Grandin <noel@peralex.com> | 2013-11-05 14:39:55 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-11-11 12:58:13 +0200 |
commit | fcd1637d5101b9142e6808edfb77b01122857901 (patch) | |
tree | 5fd09f97de80cf2a9481bd55a798015db35f1d0c /i18npool/source/breakiterator/breakiteratorImpl.cxx | |
parent | ef90021abe3735fba57145598fd7c3d359d2718e (diff) |
convert OUString compareToAscii == 0 to equalsAscii
Convert code like
aStr.compareToAscii("XXX") == 0
to
aStr.equalsAscii("XXX")
which is both easier to read and faster.
Change-Id: I448abf58f2fa0e7715dba53f8e8825ca0587c83f
Diffstat (limited to 'i18npool/source/breakiterator/breakiteratorImpl.cxx')
-rw-r--r-- | i18npool/source/breakiterator/breakiteratorImpl.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/i18npool/source/breakiterator/breakiteratorImpl.cxx b/i18npool/source/breakiterator/breakiteratorImpl.cxx index b5e4331768cb..0123583b0ad9 100644 --- a/i18npool/source/breakiterator/breakiteratorImpl.cxx +++ b/i18npool/source/breakiterator/breakiteratorImpl.cxx @@ -587,9 +587,9 @@ BreakIteratorImpl::getLocaleSpecificBreakIterator(const Locale& rLocale) throw ( // load service with name <base>_<lang>_<country> createLocaleSpecificBreakIterator(aBuf.append(rLocale.Language).append(under).append( rLocale.Country).makeStringAndClear())) || - (l > 0 && c > 0 && rLocale.Language.compareToAscii("zh") == 0 && - (rLocale.Country.compareToAscii("HK") == 0 || - rLocale.Country.compareToAscii("MO") == 0) && + (l > 0 && c > 0 && rLocale.Language.equalsAscii("zh") && + (rLocale.Country.equalsAscii("HK") || + rLocale.Country.equalsAscii("MO") ) && // if the country code is HK or MO, one more step to try TW. createLocaleSpecificBreakIterator(aBuf.append(rLocale.Language).append(under).appendAscii( "TW").makeStringAndClear())) || |