diff options
Diffstat (limited to 'deps/icu-small/source/i18n/measunit.cpp')
-rw-r--r-- | deps/icu-small/source/i18n/measunit.cpp | 87 |
1 files changed, 64 insertions, 23 deletions
diff --git a/deps/icu-small/source/i18n/measunit.cpp b/deps/icu-small/source/i18n/measunit.cpp index e21afcba02..dc156aa720 100644 --- a/deps/icu-small/source/i18n/measunit.cpp +++ b/deps/icu-small/source/i18n/measunit.cpp @@ -41,21 +41,21 @@ static const int32_t gOffsets[] = { 16, 20, 24, - 285, - 295, - 306, - 310, - 316, - 320, - 340, - 341, + 321, + 331, + 342, + 346, 352, - 355, - 361, - 366, - 370, - 374, - 399 + 356, + 376, + 377, + 388, + 391, + 397, + 402, + 406, + 410, + 435 }; static const int32_t gIndexes[] = { @@ -136,15 +136,18 @@ static const char * const gSubTypes[] = { "AED", "AFA", "AFN", + "ALK", "ALL", "AMD", "ANG", "AOA", + "AOK", "AON", "AOR", "ARA", "ARP", "ARS", + "ARY", "ATS", "AUD", "AWG", @@ -158,6 +161,8 @@ static const char * const gSubTypes[] = { "BEC", "BEF", "BEL", + "BGJ", + "BGK", "BGL", "BGN", "BHD", @@ -165,7 +170,9 @@ static const char * const gSubTypes[] = { "BMD", "BND", "BOB", + "BOP", "BOV", + "BRB", "BRC", "BRE", "BRL", @@ -173,6 +180,7 @@ static const char * const gSubTypes[] = { "BRR", "BSD", "BTN", + "BUK", "BWP", "BYB", "BYN", @@ -191,6 +199,7 @@ static const char * const gSubTypes[] = { "COU", "CRC", "CSD", + "CSJ", "CSK", "CUC", "CUP", @@ -225,10 +234,13 @@ static const char * const gSubTypes[] = { "GHS", "GIP", "GMD", + "GNE", "GNF", + "GNS", "GQE", "GRD", "GTQ", + "GWE", "GWP", "GYD", "HKD", @@ -239,10 +251,13 @@ static const char * const gSubTypes[] = { "HUF", "IDR", "IEP", + "ILP", + "ILR", "ILS", "INR", "IQD", "IRR", + "ISJ", "ISK", "ITL", "JMD", @@ -257,11 +272,13 @@ static const char * const gSubTypes[] = { "KWD", "KYD", "KZT", + "LAJ", "LAK", "LBP", "LKR", "LRD", "LSL", + "LSM", "LTL", "LTT", "LUC", @@ -280,17 +297,23 @@ static const char * const gSubTypes[] = { "MNT", "MOP", "MRO", + "MRU", "MTL", + "MTP", "MUR", + "MVQ", "MVR", "MWK", "MXN", + "MXP", "MXV", "MYR", + "MZE", "MZM", "MZN", "NAD", "NGN", + "NIC", "NIO", "NLG", "NOK", @@ -298,6 +321,7 @@ static const char * const gSubTypes[] = { "NZD", "OMR", "PAB", + "PEH", "PEI", "PEN", "PES", @@ -309,6 +333,8 @@ static const char * const gSubTypes[] = { "PTE", "PYG", "QAR", + "RHD", + "ROK", "ROL", "RON", "RSD", @@ -320,6 +346,7 @@ static const char * const gSubTypes[] = { "SCR", "SDD", "SDG", + "SDP", "SEK", "SGD", "SHP", @@ -331,6 +358,8 @@ static const char * const gSubTypes[] = { "SRG", "SSP", "STD", + "STN", + "SUR", "SVC", "SYP", "SZL", @@ -349,15 +378,20 @@ static const char * const gSubTypes[] = { "TZS", "UAH", "UAK", + "UGS", + "UGW", "UGX", "USD", "USN", "USS", "UYI", + "UYN", + "UYP", "UYU", "UZS", "VEB", "VEF", + "VNC", "VND", "VUV", "WST", @@ -381,6 +415,7 @@ static const char * const gSubTypes[] = { "XXX", "YDD", "YER", + "YUD", "YUM", "YUN", "ZAL", @@ -389,6 +424,7 @@ static const char * const gSubTypes[] = { "ZMW", "ZRN", "ZRZ", + "ZWC", "ZWD", "ZWL", "ZWN", @@ -511,16 +547,20 @@ static const char * const gSubTypes[] = { // Must be sorted by first value and then second value. static int32_t unitPerUnitToSingleUnit[][4] = { - {327, 297, 17, 0}, - {329, 303, 17, 2}, - {331, 297, 17, 3}, - {331, 388, 4, 2}, - {331, 389, 4, 3}, - {346, 386, 3, 1}, - {349, 11, 16, 4}, - {391, 327, 4, 1} + {363, 333, 17, 0}, + {365, 339, 17, 2}, + {367, 333, 17, 3}, + {367, 424, 4, 2}, + {367, 425, 4, 3}, + {382, 422, 3, 1}, + {385, 11, 16, 4}, + {427, 363, 4, 1} }; +// Shortcuts to the base unit in order to make the default constructor fast +static const int32_t kBaseTypeIdx = 14; +static const int32_t kBaseSubTypeIdx = 0; + MeasureUnit *MeasureUnit::createGForce(UErrorCode &status) { return MeasureUnit::create(0, 0, status); } @@ -1082,7 +1122,8 @@ static int32_t binarySearch( MeasureUnit::MeasureUnit() { fCurrency[0] = 0; - initNoUnit("base"); + fTypeId = kBaseTypeIdx; + fSubTypeId = kBaseSubTypeIdx; } MeasureUnit::MeasureUnit(const MeasureUnit &other) |