diff --git a/libraries/libstratosphere/include/stratosphere/settings/settings_types.hpp b/libraries/libstratosphere/include/stratosphere/settings/settings_types.hpp index a22adcad0..6441fbb33 100644 --- a/libraries/libstratosphere/include/stratosphere/settings/settings_types.hpp +++ b/libraries/libstratosphere/include/stratosphere/settings/settings_types.hpp @@ -71,7 +71,7 @@ namespace ams::settings { } template - static constexpr inline LanguageCode EncodeLanguage = [] { + static constexpr inline LanguageCode EncodeLanguage() { if constexpr (false) { /* ... */ } #define AMS_MATCH_LANGUAGE(lang, enc) else if constexpr (Lang == Language_##lang) { return LanguageCode::Encode(enc); } AMS_MATCH_LANGUAGE(Japanese, "ja") @@ -94,28 +94,28 @@ namespace ams::settings { AMS_MATCH_LANGUAGE(TraditionalChinese, "zh-Hant") #undef AMS_MATCH_LANGUAGE else { static_assert(Lang != Language_Japanese); } - }(); + } static constexpr inline LanguageCode Encode(const Language language) { constexpr LanguageCode EncodedLanguages[Language_Count] = { - EncodeLanguage, - EncodeLanguage, - EncodeLanguage, - EncodeLanguage, - EncodeLanguage, - EncodeLanguage, - EncodeLanguage, - EncodeLanguage, - EncodeLanguage, - EncodeLanguage, - EncodeLanguage, - EncodeLanguage, - EncodeLanguage, - EncodeLanguage, - EncodeLanguage, + EncodeLanguage(), + EncodeLanguage(), + EncodeLanguage(), + EncodeLanguage(), + EncodeLanguage(), + EncodeLanguage(), + EncodeLanguage(), + EncodeLanguage(), + EncodeLanguage(), + EncodeLanguage(), + EncodeLanguage(), + EncodeLanguage(), + EncodeLanguage(), + EncodeLanguage(), + EncodeLanguage(), /* 4.0.0+ */ - EncodeLanguage, - EncodeLanguage, + EncodeLanguage(), + EncodeLanguage(), }; return EncodedLanguages[language]; }