ICU-2119 remove old code

X-SVN-Rev: 11574
This commit is contained in:
Alan Liu 2003-04-17 19:47:59 +00:00
parent 06e50a0d36
commit 3d61951c5c

View file

@ -187,15 +187,13 @@ ucurr_getName(const UChar* currency,
//| //...
//| }
//|}
// There may be 2, 3, or 4 entries. If entry 3 or 4 is absent
// it is assumed to be identical to entry 0 or 1.
if (ec == NULL || U_FAILURE(*ec)) {
return 0;
}
int32_t choice = (int32_t) nameStyle;
if (choice < 0 || choice > 3) {
if (choice < 0 || choice > 1) {
*ec = U_ILLEGAL_ARGUMENT_ERROR;
return 0;
}
@ -231,10 +229,6 @@ ucurr_getName(const UChar* currency,
UResourceBundle* rb = ures_open(NULL, loc, &ec2);
UResourceBundle* curr = ures_getByKey(rb, CURRENCIES, NULL, &ec2);
UResourceBundle* names = ures_getByKey(curr, buf, NULL, &ec2);
int32_t n = ures_getSize(names); // should be 2, 3, or 4
if (choice >= n) {
choice &= 1; // fold 2..3 down to 0..1
}
s = ures_getStringByIndex(names, choice, len, &ec2);
ures_close(names);
ures_close(curr);