mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-13 17:01:16 +00:00
ICU-5426 Compact cached UnicodeSets, and make setCharacters take a const UnicodeSet.
X-SVN-Rev: 20460
This commit is contained in:
parent
7929f274ba
commit
c34f0ecd83
2 changed files with 10 additions and 2 deletions
|
@ -81,8 +81,10 @@ DictionaryBreakEngine::findBreaks( UText *text,
|
|||
}
|
||||
|
||||
void
|
||||
DictionaryBreakEngine::setCharacters( UnicodeSet &set ) {
|
||||
DictionaryBreakEngine::setCharacters( const UnicodeSet &set ) {
|
||||
fSet = set;
|
||||
// Compact for caching
|
||||
fSet.compact();
|
||||
}
|
||||
|
||||
/*void
|
||||
|
@ -225,6 +227,12 @@ ThaiBreakEngine::ThaiBreakEngine(const TrieWordDictionary *adoptDictionary, UErr
|
|||
fBeginWordSet.add(0x0E40, 0x0E44); // SARA E through SARA AI MAIMALAI
|
||||
fSuffixSet.add(THAI_PAIYANNOI);
|
||||
fSuffixSet.add(THAI_MAIYAMOK);
|
||||
|
||||
// Compact for caching.
|
||||
fMarkSet.compact();
|
||||
fEndWordSet.compact();
|
||||
fBeginWordSet.compact();
|
||||
fSuffixSet.compact();
|
||||
}
|
||||
|
||||
ThaiBreakEngine::~ThaiBreakEngine() {
|
||||
|
|
|
@ -104,7 +104,7 @@ class DictionaryBreakEngine : public LanguageBreakEngine {
|
|||
*
|
||||
* @param set A UnicodeSet of the set of characters handled by the engine
|
||||
*/
|
||||
virtual void setCharacters( UnicodeSet &set );
|
||||
virtual void setCharacters( const UnicodeSet &set );
|
||||
|
||||
/**
|
||||
* <p>Set the break types handled by this engine.</p>
|
||||
|
|
Loading…
Add table
Reference in a new issue