mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-15 01:42:37 +00:00
ICU-11238 simpler fix
X-SVN-Rev: 36467
This commit is contained in:
parent
84d1d936ab
commit
420125c1cc
1 changed files with 6 additions and 4 deletions
|
@ -49,6 +49,10 @@ CollationDataBuilder::CEModifier::~CEModifier() {}
|
|||
* Context strings must be unique and in ascending order.
|
||||
*/
|
||||
struct ConditionalCE32 : public UMemory {
|
||||
ConditionalCE32()
|
||||
: context(),
|
||||
ce32(0), defaultCE32(Collation::NO_CE32), builtCE32(Collation::NO_CE32),
|
||||
next(-1) {}
|
||||
ConditionalCE32(const UnicodeString &ct, uint32_t ce)
|
||||
: context(ct),
|
||||
ce32(ce), defaultCE32(Collation::NO_CE32), builtCE32(Collation::NO_CE32),
|
||||
|
@ -793,8 +797,7 @@ CollationDataBuilder::copyFromBaseCE32(UChar32 c, uint32_t ce32, UBool withConte
|
|||
if(!withContext) {
|
||||
return copyFromBaseCE32(c, ce32, FALSE, errorCode);
|
||||
}
|
||||
UnicodeString ct;
|
||||
ConditionalCE32 head(ct, 0);
|
||||
ConditionalCE32 head;
|
||||
UnicodeString context((UChar)0);
|
||||
int32_t index;
|
||||
if(Collation::isContractionCE32(ce32)) {
|
||||
|
@ -830,8 +833,7 @@ CollationDataBuilder::copyFromBaseCE32(UChar32 c, uint32_t ce32, UBool withConte
|
|||
ce32 = CollationData::readCE32(p); // Default if no suffix match.
|
||||
return copyFromBaseCE32(c, ce32, FALSE, errorCode);
|
||||
}
|
||||
UnicodeString ct;
|
||||
ConditionalCE32 head(ct, 0);
|
||||
ConditionalCE32 head;
|
||||
UnicodeString context((UChar)0);
|
||||
copyContractionsFromBaseCE32(context, c, ce32, &head, errorCode);
|
||||
ce32 = makeBuilderContextCE32(head.next);
|
||||
|
|
Loading…
Add table
Reference in a new issue