| OLD | NEW |
| 1 /* | 1 /* |
| 2 ********************************************************************** | 2 ********************************************************************** |
| 3 * Copyright (C) 1999-2014, International Business Machines | 3 * Copyright (C) 1999-2014, International Business Machines |
| 4 * Corporation and others. All Rights Reserved. | 4 * Corporation and others. All Rights Reserved. |
| 5 ********************************************************************** | 5 ********************************************************************** |
| 6 * Date Name Description | 6 * Date Name Description |
| 7 * 11/17/99 aliu Creation. | 7 * 11/17/99 aliu Creation. |
| 8 ********************************************************************** | 8 ********************************************************************** |
| 9 */ | 9 */ |
| 10 | 10 |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 | 35 |
| 36 TransliterationRuleData::TransliterationRuleData(const TransliterationRuleData&
other) : | 36 TransliterationRuleData::TransliterationRuleData(const TransliterationRuleData&
other) : |
| 37 UMemory(other), ruleSet(other.ruleSet), | 37 UMemory(other), ruleSet(other.ruleSet), |
| 38 variablesAreOwned(TRUE), | 38 variablesAreOwned(TRUE), |
| 39 variablesBase(other.variablesBase), | 39 variablesBase(other.variablesBase), |
| 40 variablesLength(other.variablesLength) | 40 variablesLength(other.variablesLength) |
| 41 { | 41 { |
| 42 UErrorCode status = U_ZERO_ERROR; | 42 UErrorCode status = U_ZERO_ERROR; |
| 43 int32_t i = 0; | 43 int32_t i = 0; |
| 44 variableNames.setValueDeleter(uprv_deleteUObject); | 44 variableNames.setValueDeleter(uprv_deleteUObject); |
| 45 int32_t pos = -1; | 45 int32_t pos = UHASH_FIRST; |
| 46 const UHashElement *e; | 46 const UHashElement *e; |
| 47 while ((e = other.variableNames.nextElement(pos)) != 0) { | 47 while ((e = other.variableNames.nextElement(pos)) != 0) { |
| 48 UnicodeString* value = | 48 UnicodeString* value = |
| 49 new UnicodeString(*(const UnicodeString*)e->value.pointer); | 49 new UnicodeString(*(const UnicodeString*)e->value.pointer); |
| 50 // Exit out if value could not be created. | 50 // Exit out if value could not be created. |
| 51 if (value == NULL) { | 51 if (value == NULL) { |
| 52 return; | 52 return; |
| 53 } | 53 } |
| 54 variableNames.put(*(UnicodeString*)e->key.pointer, value, status); | 54 variableNames.put(*(UnicodeString*)e->key.pointer, value, status); |
| 55 } | 55 } |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 UnicodeReplacer* | 108 UnicodeReplacer* |
| 109 TransliterationRuleData::lookupReplacer(UChar32 standIn) const { | 109 TransliterationRuleData::lookupReplacer(UChar32 standIn) const { |
| 110 UnicodeFunctor *f = lookup(standIn); | 110 UnicodeFunctor *f = lookup(standIn); |
| 111 return (f != 0) ? f->toReplacer() : 0; | 111 return (f != 0) ? f->toReplacer() : 0; |
| 112 } | 112 } |
| 113 | 113 |
| 114 | 114 |
| 115 U_NAMESPACE_END | 115 U_NAMESPACE_END |
| 116 | 116 |
| 117 #endif /* #if !UCONFIG_NO_TRANSLITERATION */ | 117 #endif /* #if !UCONFIG_NO_TRANSLITERATION */ |
| OLD | NEW |