From: Andy Heninger Date: Wed, 21 Feb 2018 23:10:10 +0000 (+0000) Subject: ICU-10688 Remove redundant break type logic from BreakIterators. Merge to trunk. X-Git-Tag: release-61-rc~63 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8640bee541ac93bb79cef32ad0643b2ffd09dc3a;p=icu ICU-10688 Remove redundant break type logic from BreakIterators. Merge to trunk. X-SVN-Rev: 40967 --- 8640bee541ac93bb79cef32ad0643b2ffd09dc3a diff --cc icu4c/source/common/rbbi_cache.cpp index 0b9049eeb0a,fa2288631d9..44c66fbea36 --- a/icu4c/source/common/rbbi_cache.cpp +++ b/icu4c/source/common/rbbi_cache.cpp @@@ -165,7 -168,7 +165,7 @@@ void RuleBasedBreakIterator::Dictionary // Ask the language object if there are any breaks. It will add them to the cache and // leave the text pointer on the other side of its range, ready to search for the next one. if (lbe != NULL) { - foundBreakCount += lbe->findBreaks(text, rangeStart, rangeEnd, fBI->fBreakType, fBreaks); - foundBreakCount += lbe->findBreaks(text, rangeStart, rangeEnd, *fBreaks); ++ foundBreakCount += lbe->findBreaks(text, rangeStart, rangeEnd, fBreaks); } // Reload the loop variables for the next go-round diff --cc icu4c/source/common/unicode/rbbi.h index 165fabc7b57,e8bfc9a9c09..414d638968b --- a/icu4c/source/common/unicode/rbbi.h +++ b/icu4c/source/common/unicode/rbbi.h @@@ -117,39 -149,6 +117,32 @@@ private */ UnhandledEngine *fUnhandledBreakEngine; - /** - * - * The type of the break iterator, or -1 if it has not been set. - * @internal - */ - int32_t fBreakType; - + /** + * Counter for the number of characters encountered with the "dictionary" + * flag set. + * @internal + */ + uint32_t fDictionaryCharCount; + + /** + * A character iterator that refers to the same text as the UText, above. + * Only included for compatibility with old API, which was based on CharacterIterators. + * Value may be adopted from outside, or one of fSCharIter or fDCharIter, below. + */ + CharacterIterator *fCharIter; + + /** + * When the input text is provided by a UnicodeString, this will point to + * a characterIterator that wraps that data. Needed only for the + * implementation of getText(), a backwards compatibility issue. + */ + StringCharacterIterator fSCharIter; + + /** + * True when iteration has run off the end, and iterator functions should return UBRK_DONE. + */ + UBool fDone; + //======================================================================= // constructors //=======================================================================