| 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();
|
|
|