Eliminate a pointless check

This commit is contained in:
Thomas Goyne 2014-05-06 10:32:19 -07:00
parent 50d0744e9c
commit 32f5e00bf8
1 changed files with 4 additions and 7 deletions

View File

@ -78,6 +78,10 @@ wxString AegisubLocale::PickLanguage() {
}
wxArrayString langs = GetTranslations()->GetAvailableTranslations(AEGISUB_CATALOG);
// No translations available, so don't bother asking the user
if (langs.empty() && !active_language)
return "en_US";
langs.insert(langs.begin(), "en_US");
// Check if user local language is available, if so, make it first
@ -88,13 +92,6 @@ wxString AegisubLocale::PickLanguage() {
std::rotate(langs.begin(), it, it + 1);
}
// Nothing to pick
if (langs.empty()) return "";
// Only one language, so don't bother asking the user
if (langs.size() == 1 && !active_language)
return langs[0];
// Generate names
wxArrayString langNames;
for (auto const& lang : langs) {