ICU-13645 Remove redundant invocations of the Locale copy constructor.

This commit is contained in:
Fredrik Roubert 2018-09-17 12:56:43 -07:00 committed by Shane Carr
parent 4a8b474e77
commit 74759b467e
No known key found for this signature in database
GPG Key ID: FCED3B24AAB18B5C
2 changed files with 2 additions and 3 deletions

View File

@ -3797,7 +3797,7 @@ Calendar::setWeekData(const Locale& desiredLocale, const char *type, UErrorCode&
Locale max = Locale::createFromName(maxLocaleID);
useLocale = Locale(max.getLanguage(),max.getCountry());
} else {
useLocale = Locale(desiredLocale);
useLocale = desiredLocale;
}
/* The code here is somewhat of a hack, since week data and weekend data aren't really tied to

View File

@ -288,8 +288,7 @@ ListFormatter* ListFormatter::createInstance(const Locale& locale, UErrorCode& e
}
ListFormatter* ListFormatter::createInstance(const Locale& locale, const char *style, UErrorCode& errorCode) {
Locale tempLocale = locale;
const ListFormatInternal* listFormatInternal = getListFormatInternal(tempLocale, style, errorCode);
const ListFormatInternal* listFormatInternal = getListFormatInternal(locale, style, errorCode);
if (U_FAILURE(errorCode)) {
return nullptr;
}