ICU-10968 More efficient implementation for scriptDisplayName(UScriptCode, ...) (C)

X-SVN-Rev: 36379
This commit is contained in:
Peter Edberg 2014-09-07 06:58:20 +00:00
parent fb4d6e1222
commit 8c07d13306

View File

@ -728,15 +728,7 @@ LocaleDisplayNamesImpl::scriptDisplayName(const char* script,
UnicodeString&
LocaleDisplayNamesImpl::scriptDisplayName(UScriptCode scriptCode,
UnicodeString& result) const {
const char* name = uscript_getName(scriptCode);
if (nameLength == UDISPCTX_LENGTH_SHORT) {
langData.get("Scripts%short", name, result);
if (!result.isBogus()) {
return adjustForUsageAndContext(kCapContextUsageScript, result);
}
}
langData.get("Scripts", name, result);
return adjustForUsageAndContext(kCapContextUsageScript, result);
return scriptDisplayName(uscript_getName(scriptCode), result);
}
UnicodeString&