Refactor to invoke only one GetBestLanguage()
(based on FatPkg commit 25e83a4e8906ef80e428b7c446216faa1ba9e2a7) [jordan.l.justen@intel.com: Use script to relicense to 2-clause BSD] Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Acked-by: Mark Doran <mark.doran@intel.com> Acked-by: Laszlo Ersek <lersek@redhat.com>
This commit is contained in:
committed by
Jordan Justen
parent
b2477ca46c
commit
2cd1716d61
@ -87,23 +87,13 @@ InitializeUnicodeCollationSupportWorker (
|
|||||||
// Find the best matching matching language from the supported languages
|
// Find the best matching matching language from the supported languages
|
||||||
// of Unicode Collation (2) protocol.
|
// of Unicode Collation (2) protocol.
|
||||||
//
|
//
|
||||||
if (Language == NULL) {
|
|
||||||
BestLanguage = GetBestLanguage (
|
BestLanguage = GetBestLanguage (
|
||||||
Uci->SupportedLanguages,
|
Uci->SupportedLanguages,
|
||||||
Iso639Language,
|
Iso639Language,
|
||||||
|
(Language == NULL) ? Language : "",
|
||||||
DefaultLanguage,
|
DefaultLanguage,
|
||||||
NULL
|
NULL
|
||||||
);
|
);
|
||||||
} else {
|
|
||||||
BestLanguage = GetBestLanguage (
|
|
||||||
Uci->SupportedLanguages,
|
|
||||||
Iso639Language,
|
|
||||||
Language,
|
|
||||||
Iso639Language,
|
|
||||||
DefaultLanguage,
|
|
||||||
NULL
|
|
||||||
);
|
|
||||||
}
|
|
||||||
if (BestLanguage != NULL) {
|
if (BestLanguage != NULL) {
|
||||||
FreePool (BestLanguage);
|
FreePool (BestLanguage);
|
||||||
mUnicodeCollationInterface = Uci;
|
mUnicodeCollationInterface = Uci;
|
||||||
|
Reference in New Issue
Block a user