Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(55)

Unified Diff: source/i18n/rulebasedcollator.cpp

Issue 1621843002: ICU 56 update step 1 (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/icu.git@561
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « source/i18n/repattrn.cpp ('k') | source/i18n/scientificformathelper.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: source/i18n/rulebasedcollator.cpp
diff --git a/source/i18n/rulebasedcollator.cpp b/source/i18n/rulebasedcollator.cpp
index ce708e41628bbed10b43f6c41f9fb66f7f855cf9..758c65769cc52efb3d051b7865ea082298c69a9c 100644
--- a/source/i18n/rulebasedcollator.cpp
+++ b/source/i18n/rulebasedcollator.cpp
@@ -1,6 +1,6 @@
/*
*******************************************************************************
-* Copyright (C) 1996-2014, International Business Machines
+* Copyright (C) 1996-2015, International Business Machines
* Corporation and others. All Rights Reserved.
*******************************************************************************
* rulebasedcollator.cpp
@@ -673,9 +673,7 @@ RuleBasedCollator::setReorderCodes(const int32_t *reorderCodes, int32_t length,
errorCode = U_MEMORY_ALLOCATION_ERROR;
return;
}
- ownedSettings->aliasReordering(defaultSettings.reorderCodes,
- defaultSettings.reorderCodesLength,
- defaultSettings.reorderTable);
+ ownedSettings->copyReorderingFrom(defaultSettings, errorCode);
setFastLatinOptions(*ownedSettings);
}
return;
@@ -685,17 +683,7 @@ RuleBasedCollator::setReorderCodes(const int32_t *reorderCodes, int32_t length,
errorCode = U_MEMORY_ALLOCATION_ERROR;
return;
}
- if(length == 0) {
- ownedSettings->resetReordering();
- } else {
- uint8_t reorderTable[256];
- data->makeReorderTable(reorderCodes, length, reorderTable, errorCode);
- if(U_FAILURE(errorCode)) { return; }
- if(!ownedSettings->setReordering(reorderCodes, length, reorderTable)) {
- errorCode = U_MEMORY_ALLOCATION_ERROR;
- return;
- }
- }
+ ownedSettings->setReordering(*data, reorderCodes, length, errorCode);
setFastLatinOptions(*ownedSettings);
}
« no previous file with comments | « source/i18n/repattrn.cpp ('k') | source/i18n/scientificformathelper.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698