1
0
Fork 0
forked from suyu/suyu

control_metadata: Remove unnecessary else within GetLanguageEntry()

There's no need to indent the code here, given the if case contains a
return statement at the end of it.
This commit is contained in:
Lioncash 2018-09-19 19:02:04 -04:00
parent 05d49962b6
commit 3146502a12

View file

@ -31,7 +31,8 @@ NACP::NACP(VirtualFile file) : raw(std::make_unique<RawNACP>()) {
const LanguageEntry& NACP::GetLanguageEntry(Language language) const { const LanguageEntry& NACP::GetLanguageEntry(Language language) const {
if (language != Language::Default) { if (language != Language::Default) {
return raw->language_entries.at(static_cast<u8>(language)); return raw->language_entries.at(static_cast<u8>(language));
} else { }
for (const auto& language_entry : raw->language_entries) { for (const auto& language_entry : raw->language_entries) {
if (!language_entry.GetApplicationName().empty()) if (!language_entry.GetApplicationName().empty())
return language_entry; return language_entry;
@ -39,7 +40,6 @@ const LanguageEntry& NACP::GetLanguageEntry(Language language) const {
// Fallback to English // Fallback to English
return GetLanguageEntry(Language::AmericanEnglish); return GetLanguageEntry(Language::AmericanEnglish);
}
} }
std::string NACP::GetApplicationName(Language language) const { std::string NACP::GetApplicationName(Language language) const {