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

Unified Diff: source/i18n/measunit.cpp

Issue 1621943002: ICU 56 step 4: Apply post-56 fixes for measure/date format (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/icu.git@56goog
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/measfmt.cpp ('k') | source/i18n/plurrule_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: source/i18n/measunit.cpp
diff --git a/source/i18n/measunit.cpp b/source/i18n/measunit.cpp
index 35a56df5d7a586821c9f03452014ca7ca077e73c..40b954755567067a663edcf43457bed472a1ce81 100644
--- a/source/i18n/measunit.cpp
+++ b/source/i18n/measunit.cpp
@@ -1152,6 +1152,18 @@ int32_t MeasureUnit::getIndexCount() {
return gIndexes[UPRV_LENGTHOF(gIndexes) - 1];
}
+int32_t MeasureUnit::internalGetIndexForTypeAndSubtype(const char *type, const char *subtype) {
+ int32_t t = binarySearch(gTypes, 0, UPRV_LENGTHOF(gTypes), type);
+ if (t < 0) {
+ return t;
+ }
+ int32_t st = binarySearch(gSubTypes, gOffsets[t], gOffsets[t + 1], subtype);
+ if (st < 0) {
+ return st;
+ }
+ return gIndexes[t] + st - gOffsets[t];
+}
+
MeasureUnit *MeasureUnit::resolveUnitPerUnit(
const MeasureUnit &unit, const MeasureUnit &perUnit) {
int32_t unitOffset = unit.getOffset();
« no previous file with comments | « source/i18n/measfmt.cpp ('k') | source/i18n/plurrule_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698