Skip to content
Snippets Groups Projects
Commit 7fba9c72 authored by Michael Scire's avatar Michael Scire
Browse files

clang-format fixes

parent 7dbf4c1a
No related branches found
No related tags found
No related merge requests found
...@@ -9,5 +9,4 @@ ...@@ -9,5 +9,4 @@
namespace Service::NS { namespace Service::NS {
constexpr ResultCode ERR_APPLICATION_LANGUAGE_NOT_FOUND{ErrorModule::NS, 300}; constexpr ResultCode ERR_APPLICATION_LANGUAGE_NOT_FOUND{ErrorModule::NS, 300};
} }
\ No newline at end of file
...@@ -73,7 +73,7 @@ private: ...@@ -73,7 +73,7 @@ private:
rb.PushIpcInterface<T>(); rb.PushIpcInterface<T>();
} }
template<typename T> template <typename T>
std::shared_ptr<T> GetInterface() { std::shared_ptr<T> GetInterface() {
static_assert(std::is_base_of_v<Kernel::SessionRequestHandler, T>, static_assert(std::is_base_of_v<Kernel::SessionRequestHandler, T>,
"Not a base of ServiceFrameworkBase"); "Not a base of ServiceFrameworkBase");
......
...@@ -276,7 +276,8 @@ constexpr ApplicationLanguagePriorityList priority_list_simplified_chinese = {{ ...@@ -276,7 +276,8 @@ constexpr ApplicationLanguagePriorityList priority_list_simplified_chinese = {{
ApplicationLanguage::Korean, ApplicationLanguage::Korean,
}}; }};
const ApplicationLanguagePriorityList* GetApplicationLanguagePriorityList(ApplicationLanguage lang) { const ApplicationLanguagePriorityList* GetApplicationLanguagePriorityList(
ApplicationLanguage lang) {
switch (lang) { switch (lang) {
case ApplicationLanguage::AmericanEnglish: case ApplicationLanguage::AmericanEnglish:
return &priority_list_american_english; return &priority_list_american_english;
......
...@@ -9,33 +9,34 @@ ...@@ -9,33 +9,34 @@
#include "core/hle/service/set/set.h" #include "core/hle/service/set/set.h"
namespace Service::NS { namespace Service::NS {
/// This is nn::ns::detail::ApplicationLanguage /// This is nn::ns::detail::ApplicationLanguage
enum class ApplicationLanguage : u8 { enum class ApplicationLanguage : u8 {
AmericanEnglish = 0, AmericanEnglish = 0,
BritishEnglish, BritishEnglish,
Japanese, Japanese,
French, French,
German, German,
LatinAmericanSpanish, LatinAmericanSpanish,
Spanish, Spanish,
Italian, Italian,
Dutch, Dutch,
CanadianFrench, CanadianFrench,
Portuguese, Portuguese,
Russian, Russian,
Korean, Korean,
TraditionalChinese, TraditionalChinese,
SimplifiedChinese, SimplifiedChinese,
Count Count
}; };
using ApplicationLanguagePriorityList = const std::array<ApplicationLanguage, static_cast<std::size_t>(ApplicationLanguage::Count)>; using ApplicationLanguagePriorityList =
const std::array<ApplicationLanguage, static_cast<std::size_t>(ApplicationLanguage::Count)>;
constexpr u32 GetSupportedLanguageFlag(const ApplicationLanguage lang) { constexpr u32 GetSupportedLanguageFlag(const ApplicationLanguage lang) {
return 1u << static_cast<u32>(lang); return 1u << static_cast<u32>(lang);
} }
const ApplicationLanguagePriorityList* GetApplicationLanguagePriorityList(ApplicationLanguage lang);
const ApplicationLanguagePriorityList* GetApplicationLanguagePriorityList(ApplicationLanguage lang); std::optional<ApplicationLanguage> ConvertToApplicationLanguage(
std::optional<ApplicationLanguage> ConvertToApplicationLanguage(Service::Set::LanguageCode language_code); Service::Set::LanguageCode language_code);
std::optional<Service::Set::LanguageCode> ConvertToLanguageCode(ApplicationLanguage lang); std::optional<Service::Set::LanguageCode> ConvertToLanguageCode(ApplicationLanguage lang);
} } // namespace Service::NS
\ No newline at end of file \ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment