| OLD | NEW |
| 1 /* | 1 /* |
| 2 ******************************************************************************* | 2 ******************************************************************************* |
| 3 * Copyright (C) 2013-2014, International Business Machines | 3 * Copyright (C) 2013-2015, International Business Machines |
| 4 * Corporation and others. All Rights Reserved. | 4 * Corporation and others. All Rights Reserved. |
| 5 ******************************************************************************* | 5 ******************************************************************************* |
| 6 * collationtailoring.cpp | 6 * collationtailoring.cpp |
| 7 * | 7 * |
| 8 * created on: 2013mar12 | 8 * created on: 2013mar12 |
| 9 * created by: Markus W. Scherer | 9 * created by: Markus W. Scherer |
| 10 */ | 10 */ |
| 11 | 11 |
| 12 #include "unicode/utypes.h" | 12 #include "unicode/utypes.h" |
| 13 | 13 |
| (...skipping 19 matching lines...) Expand all Loading... |
| 33 CollationTailoring::CollationTailoring(const CollationSettings *baseSettings) | 33 CollationTailoring::CollationTailoring(const CollationSettings *baseSettings) |
| 34 : data(NULL), settings(baseSettings), | 34 : data(NULL), settings(baseSettings), |
| 35 actualLocale(""), | 35 actualLocale(""), |
| 36 ownedData(NULL), | 36 ownedData(NULL), |
| 37 builder(NULL), memory(NULL), bundle(NULL), | 37 builder(NULL), memory(NULL), bundle(NULL), |
| 38 trie(NULL), unsafeBackwardSet(NULL), | 38 trie(NULL), unsafeBackwardSet(NULL), |
| 39 maxExpansions(NULL) { | 39 maxExpansions(NULL) { |
| 40 if(baseSettings != NULL) { | 40 if(baseSettings != NULL) { |
| 41 U_ASSERT(baseSettings->reorderCodesLength == 0); | 41 U_ASSERT(baseSettings->reorderCodesLength == 0); |
| 42 U_ASSERT(baseSettings->reorderTable == NULL); | 42 U_ASSERT(baseSettings->reorderTable == NULL); |
| 43 U_ASSERT(baseSettings->minHighNoReorder == 0); |
| 43 } else { | 44 } else { |
| 44 settings = new CollationSettings(); | 45 settings = new CollationSettings(); |
| 45 } | 46 } |
| 46 if(settings != NULL) { | 47 if(settings != NULL) { |
| 47 settings->addRef(); | 48 settings->addRef(); |
| 48 } | 49 } |
| 49 rules.getTerminatedBuffer(); // ensure NUL-termination | 50 rules.getTerminatedBuffer(); // ensure NUL-termination |
| 50 version[0] = version[1] = version[2] = version[3] = 0; | 51 version[0] = version[1] = version[2] = version[3] = 0; |
| 51 maxExpansionsInitOnce.reset(); | 52 maxExpansionsInitOnce.reset(); |
| 52 } | 53 } |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 return ((int32_t)version[1] << 4) | (version[2] >> 6); | 102 return ((int32_t)version[1] << 4) | (version[2] >> 6); |
| 102 } | 103 } |
| 103 | 104 |
| 104 CollationCacheEntry::~CollationCacheEntry() { | 105 CollationCacheEntry::~CollationCacheEntry() { |
| 105 SharedObject::clearPtr(tailoring); | 106 SharedObject::clearPtr(tailoring); |
| 106 } | 107 } |
| 107 | 108 |
| 108 U_NAMESPACE_END | 109 U_NAMESPACE_END |
| 109 | 110 |
| 110 #endif // !UCONFIG_NO_COLLATION | 111 #endif // !UCONFIG_NO_COLLATION |
| OLD | NEW |