ICU-5410 Fix some indention format problems.

X-SVN-Rev: 21738
This commit is contained in:
George Rhoten 2007-06-14 20:30:52 +00:00
parent ab5d23debd
commit 0307b1b225
3 changed files with 23 additions and 20 deletions

View File

@ -1,5 +1,7 @@
/*
* Copyright (C) 2001-2003, International Business Machines Corporation and others. All Rights Reserved.
**********************************************************************
* Copyright (C) 2001-2007, International Business Machines
* Corporation and others. All Rights Reserved.
**********************************************************************
* Date Name Description
* 07/26/01 aliu Creation.
@ -126,7 +128,7 @@ UBool Quantifier::matchesIndexValue(uint8_t v) const {
*/
void Quantifier::addMatchSetTo(UnicodeSet& toUnionTo) const {
if (maxCount > 0) {
matcher->toMatcher()->addMatchSetTo(toUnionTo);
matcher->toMatcher()->addMatchSetTo(toUnionTo);
}
}

View File

@ -1,6 +1,6 @@
/*
**********************************************************************
* Copyright (C) 1999-2004, International Business Machines
* Copyright (C) 1999-2007, International Business Machines
* Corporation and others. All Rights Reserved.
**********************************************************************
* Date Name Description
@ -529,14 +529,14 @@ void TransliterationRule::setData(const TransliterationRuleData* d) {
void TransliterationRule::addSourceSetTo(UnicodeSet& toUnionTo) const {
int32_t limit = anteContextLength + keyLength;
for (int32_t i=anteContextLength; i<limit; ) {
UChar32 ch = pattern.char32At(i);
i += UTF_CHAR_LENGTH(ch);
const UnicodeMatcher* matcher = data->lookupMatcher(ch);
if (matcher == NULL) {
toUnionTo.add(ch);
} else {
matcher->addMatchSetTo(toUnionTo);
}
UChar32 ch = pattern.char32At(i);
i += UTF_CHAR_LENGTH(ch);
const UnicodeMatcher* matcher = data->lookupMatcher(ch);
if (matcher == NULL) {
toUnionTo.add(ch);
} else {
matcher->addMatchSetTo(toUnionTo);
}
}
}

View File

@ -1,6 +1,6 @@
/*
**********************************************************************
* Copyright (C) 1999-2005, International Business Machines
* Copyright (C) 1999-2007, International Business Machines
* Corporation and others. All Rights Reserved.
**********************************************************************
* Date Name Description
@ -434,17 +434,18 @@ UnicodeString& TransliterationRuleSet::toRules(UnicodeString& ruleSource,
* (getTarget=false) or emitted (getTarget=true) by this set.
*/
UnicodeSet& TransliterationRuleSet::getSourceTargetSet(UnicodeSet& result,
UBool getTarget) const {
UBool getTarget) const
{
result.clear();
int32_t count = ruleVector->size();
for (int32_t i=0; i<count; ++i) {
TransliterationRule* r =
(TransliterationRule*) ruleVector->elementAt(i);
if (getTarget) {
r->addTargetSetTo(result);
} else {
r->addSourceSetTo(result);
}
TransliterationRule* r =
(TransliterationRule*) ruleVector->elementAt(i);
if (getTarget) {
r->addTargetSetTo(result);
} else {
r->addSourceSetTo(result);
}
}
return result;
}