| OLD | NEW |
| 1 /* | 1 /* |
| 2 ********************************************************************** | 2 ********************************************************************** |
| 3 * Copyright (C) 1999-2011, 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 |
| 11 #include "unicode/utypes.h" | 11 #include "unicode/utypes.h" |
| 12 #include "umutex.h" | 12 #include "umutex.h" |
| 13 | 13 |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 for (i=0; i<variablesLength; ++i) { | 65 for (i=0; i<variablesLength; ++i) { |
| 66 variables[i] = other.variables[i]->clone(); | 66 variables[i] = other.variables[i]->clone(); |
| 67 if (variables[i] == NULL) { | 67 if (variables[i] == NULL) { |
| 68 status = U_MEMORY_ALLOCATION_ERROR; | 68 status = U_MEMORY_ALLOCATION_ERROR; |
| 69 break; | 69 break; |
| 70 } | 70 } |
| 71 } | 71 } |
| 72 } | 72 } |
| 73 // Remove the array and exit if memory allocation error occured. | 73 // Remove the array and exit if memory allocation error occured. |
| 74 if (U_FAILURE(status)) { | 74 if (U_FAILURE(status)) { |
| 75 for (int32_t n = i-1; n >= 0; n++) { | 75 for (int32_t n = i-1; n >= 0; n--) { |
| 76 delete variables[n]; | 76 delete variables[n]; |
| 77 } | 77 } |
| 78 uprv_free(variables); | 78 uprv_free(variables); |
| 79 variables = NULL; | 79 variables = NULL; |
| 80 return; | 80 return; |
| 81 } | 81 } |
| 82 | 82 |
| 83 // Do this last, _after_ setting up variables[]. | 83 // Do this last, _after_ setting up variables[]. |
| 84 ruleSet.setData(this); // ruleSet must already be frozen | 84 ruleSet.setData(this); // ruleSet must already be frozen |
| 85 } | 85 } |
| (...skipping 22 matching lines...) Expand all 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 |