mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-13 00:43:32 +00:00
ICU-1265 rename RulesBasedBreakIterator::IGNORE to avoid conflict with winbase.h
X-SVN-Rev: 8007
This commit is contained in:
parent
d46d1b3fc4
commit
66bee38a79
4 changed files with 10 additions and 9 deletions
icu4c/source/common
|
@ -368,7 +368,7 @@ DictionaryBasedBreakIterator::divideUpDictionaryRange(int32_t startPos, int32_t
|
|||
text->setIndex(startPos);
|
||||
UChar c = text->current();
|
||||
int category = dictionaryTables->lookupCategory(c, this);
|
||||
while (category == IGNORE || !dictionaryTables->categoryFlags[category]) {
|
||||
while (category == RBBI_IGNORE || !dictionaryTables->categoryFlags[category]) {
|
||||
c = text->next();
|
||||
category = dictionaryTables->lookupCategory(c, this);
|
||||
}
|
||||
|
|
|
@ -63,7 +63,7 @@ DictionaryBasedBreakIteratorTables::lookupCategory(UChar c,
|
|||
// categories represented in the dictionary. If it is, bump the dictionary-
|
||||
// character count.
|
||||
int32_t result = RuleBasedBreakIteratorTables::lookupCategory(c, bi);
|
||||
if (result != RuleBasedBreakIterator::IGNORE && categoryFlags[result]) {
|
||||
if (result != RuleBasedBreakIterator::RBBI_IGNORE && categoryFlags[result]) {
|
||||
((DictionaryBasedBreakIterator*)bi)->bumpDictionaryCharCount();
|
||||
}
|
||||
return result;
|
||||
|
|
|
@ -20,7 +20,7 @@ U_NAMESPACE_BEGIN
|
|||
* A token used as a character-category value to identify ignore characters
|
||||
*/
|
||||
const int8_t
|
||||
RuleBasedBreakIterator::IGNORE = -1;
|
||||
RuleBasedBreakIterator::RBBI_IGNORE = -1;
|
||||
|
||||
/**
|
||||
* The state number of the starting state
|
||||
|
@ -456,7 +456,7 @@ int32_t RuleBasedBreakIterator::handleNext(void) {
|
|||
|
||||
// if the character isn't an ignore character, look up a state
|
||||
// transition in the state table
|
||||
if (category != IGNORE) {
|
||||
if (category != RBBI_IGNORE) {
|
||||
state = tables->lookupState(state, category);
|
||||
}
|
||||
|
||||
|
@ -488,7 +488,7 @@ int32_t RuleBasedBreakIterator::handleNext(void) {
|
|||
|
||||
// keep track of the last "real" character we saw. If this character isn't an
|
||||
// ignore character, take note of it and its position in the text
|
||||
if (category != IGNORE && state != STOP_STATE) {
|
||||
if (category != RBBI_IGNORE && state != STOP_STATE) {
|
||||
lastC = c;
|
||||
lastCPos = text->getIndex();
|
||||
}
|
||||
|
@ -542,7 +542,7 @@ int32_t RuleBasedBreakIterator::handlePrevious(void) {
|
|||
|
||||
// if the current character isn't an ignore character, look up a
|
||||
// state transition in the backwards state table
|
||||
if (category != IGNORE)
|
||||
if (category != RBBI_IGNORE)
|
||||
state = tables->lookupBackwardState(state, category);
|
||||
|
||||
// then advance one character backwards
|
||||
|
@ -555,7 +555,7 @@ int32_t RuleBasedBreakIterator::handlePrevious(void) {
|
|||
// that takes us into the stop state will always be the character BEFORE
|
||||
// the break position.)
|
||||
if (c != CharacterIterator::DONE) {
|
||||
if (lastCategory != IGNORE)
|
||||
if (lastCategory != RBBI_IGNORE)
|
||||
text->setIndex(text->getIndex() + 2);
|
||||
else
|
||||
text->next();
|
||||
|
|
|
@ -185,11 +185,12 @@ class BreakIterator;
|
|||
*/
|
||||
class U_COMMON_API RuleBasedBreakIterator : public BreakIterator {
|
||||
|
||||
public:
|
||||
protected:
|
||||
/**
|
||||
* A token used as a character-category value to identify ignore characters
|
||||
*/
|
||||
static const int8_t IGNORE;
|
||||
static const int8_t RBBI_IGNORE;
|
||||
friend class DictionaryBasedBreakIteratorTables;
|
||||
|
||||
private:
|
||||
/**
|
||||
|
|
Loading…
Add table
Reference in a new issue