Index: source/i18n/collationruleparser.cpp |
diff --git a/source/i18n/collationruleparser.cpp b/source/i18n/collationruleparser.cpp |
index ac413a2a64cd0145bde39ebb37fe05ca8a285dd2..2d2e25fcb0e1d48ee3ef4c57fdfe7a35d9ac364b 100644 |
--- a/source/i18n/collationruleparser.cpp |
+++ b/source/i18n/collationruleparser.cpp |
@@ -1,6 +1,6 @@ |
/* |
******************************************************************************* |
-* Copyright (C) 2013-2014, International Business Machines |
+* Copyright (C) 2013-2015, International Business Machines |
* Corporation and others. All Rights Reserved. |
******************************************************************************* |
* collationruleparser.cpp |
@@ -706,17 +706,7 @@ CollationRuleParser::parseReordering(const UnicodeString &raw, UErrorCode &error |
if(U_FAILURE(errorCode)) { return; } |
i = limit; |
} |
- int32_t length = reorderCodes.size(); |
- if(length == 1 && reorderCodes.elementAti(0) == UCOL_REORDER_CODE_NONE) { |
- settings->resetReordering(); |
- return; |
- } |
- uint8_t table[256]; |
- baseData->makeReorderTable(reorderCodes.getBuffer(), length, table, errorCode); |
- if(U_FAILURE(errorCode)) { return; } |
- if(!settings->setReordering(reorderCodes.getBuffer(), length, table)) { |
- errorCode = U_MEMORY_ALLOCATION_ERROR; |
- } |
+ settings->setReordering(*baseData, reorderCodes.getBuffer(), reorderCodes.size(), errorCode); |
} |
static const char *const gSpecialReorderCodes[] = { |