summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorGravatar Michael Scire2019-05-23 01:28:27 -0700
committerGravatar Michael Scire2019-05-23 01:28:27 -0700
commitd81b58f320f9ace1d80cfca6889cbee98813cd83 (patch)
treeb5a1886b3305b46bb561d220965c806536d2ff47 /src/core
parentclang-format fixes (diff)
downloadyuzu-d81b58f320f9ace1d80cfca6889cbee98813cd83.tar.gz
yuzu-d81b58f320f9ace1d80cfca6889cbee98813cd83.tar.xz
yuzu-d81b58f320f9ace1d80cfca6889cbee98813cd83.zip
Address review comments
Diffstat (limited to 'src/core')
-rw-r--r--src/core/CMakeLists.txt4
-rw-r--r--src/core/hle/service/ns/language.cpp (renamed from src/core/hle/service/ns/ns_language.cpp)71
-rw-r--r--src/core/hle/service/ns/language.h45
-rw-r--r--src/core/hle/service/ns/ns.cpp29
-rw-r--r--src/core/hle/service/ns/ns.h14
-rw-r--r--src/core/hle/service/ns/ns_language.h4
6 files changed, 120 insertions, 47 deletions
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt
index 2105b7242..fbb1b91a3 100644
--- a/src/core/CMakeLists.txt
+++ b/src/core/CMakeLists.txt
@@ -327,10 +327,10 @@ add_library(core STATIC
327 hle/service/npns/npns.cpp 327 hle/service/npns/npns.cpp
328 hle/service/npns/npns.h 328 hle/service/npns/npns.h
329 hle/service/ns/errors.h 329 hle/service/ns/errors.h
330 hle/service/ns/language.cpp
331 hle/service/ns/language.h
330 hle/service/ns/ns.cpp 332 hle/service/ns/ns.cpp
331 hle/service/ns/ns.h 333 hle/service/ns/ns.h
332 hle/service/ns/ns_language.cpp
333 hle/service/ns/ns_language.h
334 hle/service/ns/pl_u.cpp 334 hle/service/ns/pl_u.cpp
335 hle/service/ns/pl_u.h 335 hle/service/ns/pl_u.h
336 hle/service/nvdrv/devices/nvdevice.h 336 hle/service/nvdrv/devices/nvdevice.h
diff --git a/src/core/hle/service/ns/ns_language.cpp b/src/core/hle/service/ns/language.cpp
index fa95e75da..29c4a820c 100644
--- a/src/core/hle/service/ns/ns_language.cpp
+++ b/src/core/hle/service/ns/language.cpp
@@ -1,8 +1,9 @@
1// Copyright 2018 yuzu emulator team 1// Copyright 2019 yuzu emulator team
2// Licensed under GPLv2 or any later version 2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included. 3// Refer to the license.txt file included.
4 4
5#include "core/hle/service/ns/ns_language.h" 5#include "core/hle/service/ns/language.h"
6#include "core/hle/service/set/set.h"
6 7
7namespace Service::NS { 8namespace Service::NS {
8 9
@@ -277,7 +278,7 @@ constexpr ApplicationLanguagePriorityList priority_list_simplified_chinese = {{
277}}; 278}};
278 279
279const ApplicationLanguagePriorityList* GetApplicationLanguagePriorityList( 280const ApplicationLanguagePriorityList* GetApplicationLanguagePriorityList(
280 ApplicationLanguage lang) { 281 const ApplicationLanguage lang) {
281 switch (lang) { 282 switch (lang) {
282 case ApplicationLanguage::AmericanEnglish: 283 case ApplicationLanguage::AmericanEnglish:
283 return &priority_list_american_english; 284 return &priority_list_american_english;
@@ -315,75 +316,75 @@ const ApplicationLanguagePriorityList* GetApplicationLanguagePriorityList(
315} 316}
316 317
317std::optional<ApplicationLanguage> ConvertToApplicationLanguage( 318std::optional<ApplicationLanguage> ConvertToApplicationLanguage(
318 const Service::Set::LanguageCode language_code) { 319 const Set::LanguageCode language_code) {
319 switch (language_code) { 320 switch (language_code) {
320 case Service::Set::LanguageCode::EN_US: 321 case Set::LanguageCode::EN_US:
321 return ApplicationLanguage::AmericanEnglish; 322 return ApplicationLanguage::AmericanEnglish;
322 case Service::Set::LanguageCode::EN_GB: 323 case Set::LanguageCode::EN_GB:
323 return ApplicationLanguage::BritishEnglish; 324 return ApplicationLanguage::BritishEnglish;
324 case Service::Set::LanguageCode::JA: 325 case Set::LanguageCode::JA:
325 return ApplicationLanguage::Japanese; 326 return ApplicationLanguage::Japanese;
326 case Service::Set::LanguageCode::FR: 327 case Set::LanguageCode::FR:
327 return ApplicationLanguage::French; 328 return ApplicationLanguage::French;
328 case Service::Set::LanguageCode::DE: 329 case Set::LanguageCode::DE:
329 return ApplicationLanguage::German; 330 return ApplicationLanguage::German;
330 case Service::Set::LanguageCode::ES_419: 331 case Set::LanguageCode::ES_419:
331 return ApplicationLanguage::LatinAmericanSpanish; 332 return ApplicationLanguage::LatinAmericanSpanish;
332 case Service::Set::LanguageCode::ES: 333 case Set::LanguageCode::ES:
333 return ApplicationLanguage::Spanish; 334 return ApplicationLanguage::Spanish;
334 case Service::Set::LanguageCode::IT: 335 case Set::LanguageCode::IT:
335 return ApplicationLanguage::Italian; 336 return ApplicationLanguage::Italian;
336 case Service::Set::LanguageCode::NL: 337 case Set::LanguageCode::NL:
337 return ApplicationLanguage::Dutch; 338 return ApplicationLanguage::Dutch;
338 case Service::Set::LanguageCode::FR_CA: 339 case Set::LanguageCode::FR_CA:
339 return ApplicationLanguage::CanadianFrench; 340 return ApplicationLanguage::CanadianFrench;
340 case Service::Set::LanguageCode::PT: 341 case Set::LanguageCode::PT:
341 return ApplicationLanguage::Portuguese; 342 return ApplicationLanguage::Portuguese;
342 case Service::Set::LanguageCode::RU: 343 case Set::LanguageCode::RU:
343 return ApplicationLanguage::Russian; 344 return ApplicationLanguage::Russian;
344 case Service::Set::LanguageCode::KO: 345 case Set::LanguageCode::KO:
345 return ApplicationLanguage::Korean; 346 return ApplicationLanguage::Korean;
346 case Service::Set::LanguageCode::ZH_HANT: 347 case Set::LanguageCode::ZH_HANT:
347 return ApplicationLanguage::TraditionalChinese; 348 return ApplicationLanguage::TraditionalChinese;
348 case Service::Set::LanguageCode::ZH_HANS: 349 case Set::LanguageCode::ZH_HANS:
349 return ApplicationLanguage::SimplifiedChinese; 350 return ApplicationLanguage::SimplifiedChinese;
350 default: 351 default:
351 return std::nullopt; 352 return std::nullopt;
352 } 353 }
353} 354}
354 355
355std::optional<Service::Set::LanguageCode> ConvertToLanguageCode(const ApplicationLanguage lang) { 356std::optional<Set::LanguageCode> ConvertToLanguageCode(const ApplicationLanguage lang) {
356 switch (lang) { 357 switch (lang) {
357 case ApplicationLanguage::AmericanEnglish: 358 case ApplicationLanguage::AmericanEnglish:
358 return Service::Set::LanguageCode::EN_US; 359 return Set::LanguageCode::EN_US;
359 case ApplicationLanguage::BritishEnglish: 360 case ApplicationLanguage::BritishEnglish:
360 return Service::Set::LanguageCode::EN_GB; 361 return Set::LanguageCode::EN_GB;
361 case ApplicationLanguage::Japanese: 362 case ApplicationLanguage::Japanese:
362 return Service::Set::LanguageCode::JA; 363 return Set::LanguageCode::JA;
363 case ApplicationLanguage::French: 364 case ApplicationLanguage::French:
364 return Service::Set::LanguageCode::FR; 365 return Set::LanguageCode::FR;
365 case ApplicationLanguage::German: 366 case ApplicationLanguage::German:
366 return Service::Set::LanguageCode::DE; 367 return Set::LanguageCode::DE;
367 case ApplicationLanguage::LatinAmericanSpanish: 368 case ApplicationLanguage::LatinAmericanSpanish:
368 return Service::Set::LanguageCode::ES_419; 369 return Set::LanguageCode::ES_419;
369 case ApplicationLanguage::Spanish: 370 case ApplicationLanguage::Spanish:
370 return Service::Set::LanguageCode::ES; 371 return Set::LanguageCode::ES;
371 case ApplicationLanguage::Italian: 372 case ApplicationLanguage::Italian:
372 return Service::Set::LanguageCode::IT; 373 return Set::LanguageCode::IT;
373 case ApplicationLanguage::Dutch: 374 case ApplicationLanguage::Dutch:
374 return Service::Set::LanguageCode::NL; 375 return Set::LanguageCode::NL;
375 case ApplicationLanguage::CanadianFrench: 376 case ApplicationLanguage::CanadianFrench:
376 return Service::Set::LanguageCode::FR_CA; 377 return Set::LanguageCode::FR_CA;
377 case ApplicationLanguage::Portuguese: 378 case ApplicationLanguage::Portuguese:
378 return Service::Set::LanguageCode::PT; 379 return Set::LanguageCode::PT;
379 case ApplicationLanguage::Russian: 380 case ApplicationLanguage::Russian:
380 return Service::Set::LanguageCode::RU; 381 return Set::LanguageCode::RU;
381 case ApplicationLanguage::Korean: 382 case ApplicationLanguage::Korean:
382 return Service::Set::LanguageCode::KO; 383 return Set::LanguageCode::KO;
383 case ApplicationLanguage::TraditionalChinese: 384 case ApplicationLanguage::TraditionalChinese:
384 return Service::Set::LanguageCode::ZH_HANT; 385 return Set::LanguageCode::ZH_HANT;
385 case ApplicationLanguage::SimplifiedChinese: 386 case ApplicationLanguage::SimplifiedChinese:
386 return Service::Set::LanguageCode::ZH_HANS; 387 return Set::LanguageCode::ZH_HANS;
387 default: 388 default:
388 return std::nullopt; 389 return std::nullopt;
389 } 390 }
diff --git a/src/core/hle/service/ns/language.h b/src/core/hle/service/ns/language.h
new file mode 100644
index 000000000..e9829f9d2
--- /dev/null
+++ b/src/core/hle/service/ns/language.h
@@ -0,0 +1,45 @@
1// Copyright 2019 yuzu emulator team
2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included.
4
5#pragma once
6
7#include <optional>
8#include <string>
9#include "common/common_types.h"
10
11namespace Service::Set {
12enum class LanguageCode : u64;
13}
14
15namespace Service::NS {
16/// This is nn::ns::detail::ApplicationLanguage
17enum class ApplicationLanguage : u8 {
18 AmericanEnglish = 0,
19 BritishEnglish,
20 Japanese,
21 French,
22 German,
23 LatinAmericanSpanish,
24 Spanish,
25 Italian,
26 Dutch,
27 CanadianFrench,
28 Portuguese,
29 Russian,
30 Korean,
31 TraditionalChinese,
32 SimplifiedChinese,
33 Count
34};
35using ApplicationLanguagePriorityList =
36 const std::array<ApplicationLanguage, static_cast<std::size_t>(ApplicationLanguage::Count)>;
37
38constexpr u32 GetSupportedLanguageFlag(const ApplicationLanguage lang) {
39 return 1U << static_cast<u32>(lang);
40}
41
42const ApplicationLanguagePriorityList* GetApplicationLanguagePriorityList(ApplicationLanguage lang);
43std::optional<ApplicationLanguage> ConvertToApplicationLanguage(Set::LanguageCode language_code);
44std::optional<Set::LanguageCode> ConvertToLanguageCode(ApplicationLanguage lang);
45} // namespace Service::NS \ No newline at end of file
diff --git a/src/core/hle/service/ns/ns.cpp b/src/core/hle/service/ns/ns.cpp
index fa49b4293..e892b50f3 100644
--- a/src/core/hle/service/ns/ns.cpp
+++ b/src/core/hle/service/ns/ns.cpp
@@ -9,8 +9,9 @@
9#include "core/hle/kernel/hle_ipc.h" 9#include "core/hle/kernel/hle_ipc.h"
10#include "core/hle/service/ns/errors.h" 10#include "core/hle/service/ns/errors.h"
11#include "core/hle/service/ns/ns.h" 11#include "core/hle/service/ns/ns.h"
12#include "core/hle/service/ns/ns_language.h" 12#include "core/hle/service/ns/language.h"
13#include "core/hle/service/ns/pl_u.h" 13#include "core/hle/service/ns/pl_u.h"
14#include "core/hle/service/set/set.h"
14#include "core/settings.h" 15#include "core/settings.h"
15 16
16namespace Service::NS { 17namespace Service::NS {
@@ -25,6 +26,8 @@ IAccountProxyInterface::IAccountProxyInterface() : ServiceFramework{"IAccountPro
25 RegisterHandlers(functions); 26 RegisterHandlers(functions);
26} 27}
27 28
29IAccountProxyInterface::~IAccountProxyInterface() = default;
30
28IApplicationManagerInterface::IApplicationManagerInterface() 31IApplicationManagerInterface::IApplicationManagerInterface()
29 : ServiceFramework{"IApplicationManagerInterface"} { 32 : ServiceFramework{"IApplicationManagerInterface"} {
30 // clang-format off 33 // clang-format off
@@ -246,6 +249,8 @@ IApplicationManagerInterface::IApplicationManagerInterface()
246 RegisterHandlers(functions); 249 RegisterHandlers(functions);
247} 250}
248 251
252IApplicationManagerInterface::~IApplicationManagerInterface() = default;
253
249void IApplicationManagerInterface::GetApplicationControlData(Kernel::HLERequestContext& ctx) { 254void IApplicationManagerInterface::GetApplicationControlData(Kernel::HLERequestContext& ctx) {
250 IPC::RequestParser rp{ctx}; 255 IPC::RequestParser rp{ctx};
251 const auto flag = rp.PopRaw<u64>(); 256 const auto flag = rp.PopRaw<u64>();
@@ -325,7 +330,7 @@ ResultVal<u8> IApplicationManagerInterface::GetApplicationDesiredLanguage(
325 330
326 // Get language code from settings 331 // Get language code from settings
327 const auto language_code = 332 const auto language_code =
328 Service::Set::GetLanguageCodeFromIndex(Settings::values.language_index); 333 Set::GetLanguageCodeFromIndex(Settings::values.language_index);
329 334
330 // Convert to application language, get priority list 335 // Convert to application language, get priority list
331 const auto application_language = ConvertToApplicationLanguage(language_code); 336 const auto application_language = ConvertToApplicationLanguage(language_code);
@@ -342,7 +347,7 @@ ResultVal<u8> IApplicationManagerInterface::GetApplicationDesiredLanguage(
342 const auto supported_flag = GetSupportedLanguageFlag(lang); 347 const auto supported_flag = GetSupportedLanguageFlag(lang);
343 if (supported_languages == 0 || 348 if (supported_languages == 0 ||
344 (supported_languages & supported_flag) == supported_languages) { 349 (supported_languages & supported_flag) == supported_languages) {
345 return ResultVal<u8>::WithCode(RESULT_SUCCESS, static_cast<u8>(lang)); 350 return MakeResult(static_cast<u8>(lang));
346 } 351 }
347 } 352 }
348 353
@@ -373,7 +378,7 @@ ResultVal<u64> IApplicationManagerInterface::ConvertApplicationLanguageToLanguag
373 return ERR_APPLICATION_LANGUAGE_NOT_FOUND; 378 return ERR_APPLICATION_LANGUAGE_NOT_FOUND;
374 } 379 }
375 380
376 return ResultVal<u64>::WithCode(RESULT_SUCCESS, static_cast<u64>(*language_code)); 381 return MakeResult(static_cast<u64>(*language_code));
377} 382}
378 383
379IApplicationVersionInterface::IApplicationVersionInterface() 384IApplicationVersionInterface::IApplicationVersionInterface()
@@ -395,6 +400,8 @@ IApplicationVersionInterface::IApplicationVersionInterface()
395 RegisterHandlers(functions); 400 RegisterHandlers(functions);
396} 401}
397 402
403IApplicationVersionInterface::~IApplicationVersionInterface() = default;
404
398IContentManagerInterface::IContentManagerInterface() 405IContentManagerInterface::IContentManagerInterface()
399 : ServiceFramework{"IContentManagerInterface"} { 406 : ServiceFramework{"IContentManagerInterface"} {
400 // clang-format off 407 // clang-format off
@@ -413,6 +420,8 @@ IContentManagerInterface::IContentManagerInterface()
413 RegisterHandlers(functions); 420 RegisterHandlers(functions);
414} 421}
415 422
423IContentManagerInterface::~IContentManagerInterface() = default;
424
416IDocumentInterface::IDocumentInterface() : ServiceFramework{"IDocumentInterface"} { 425IDocumentInterface::IDocumentInterface() : ServiceFramework{"IDocumentInterface"} {
417 // clang-format off 426 // clang-format off
418 static const FunctionInfo functions[] = { 427 static const FunctionInfo functions[] = {
@@ -425,6 +434,8 @@ IDocumentInterface::IDocumentInterface() : ServiceFramework{"IDocumentInterface"
425 RegisterHandlers(functions); 434 RegisterHandlers(functions);
426} 435}
427 436
437IDocumentInterface::~IDocumentInterface() = default;
438
428IDownloadTaskInterface::IDownloadTaskInterface() : ServiceFramework{"IDownloadTaskInterface"} { 439IDownloadTaskInterface::IDownloadTaskInterface() : ServiceFramework{"IDownloadTaskInterface"} {
429 // clang-format off 440 // clang-format off
430 static const FunctionInfo functions[] = { 441 static const FunctionInfo functions[] = {
@@ -443,6 +454,8 @@ IDownloadTaskInterface::IDownloadTaskInterface() : ServiceFramework{"IDownloadTa
443 RegisterHandlers(functions); 454 RegisterHandlers(functions);
444} 455}
445 456
457IDownloadTaskInterface::~IDownloadTaskInterface() = default;
458
446IECommerceInterface::IECommerceInterface() : ServiceFramework{"IECommerceInterface"} { 459IECommerceInterface::IECommerceInterface() : ServiceFramework{"IECommerceInterface"} {
447 // clang-format off 460 // clang-format off
448 static const FunctionInfo functions[] = { 461 static const FunctionInfo functions[] = {
@@ -458,6 +471,8 @@ IECommerceInterface::IECommerceInterface() : ServiceFramework{"IECommerceInterfa
458 RegisterHandlers(functions); 471 RegisterHandlers(functions);
459} 472}
460 473
474IECommerceInterface::~IECommerceInterface() = default;
475
461IFactoryResetInterface::IFactoryResetInterface::IFactoryResetInterface() 476IFactoryResetInterface::IFactoryResetInterface::IFactoryResetInterface()
462 : ServiceFramework{"IFactoryResetInterface"} { 477 : ServiceFramework{"IFactoryResetInterface"} {
463 // clang-format off 478 // clang-format off
@@ -471,6 +486,8 @@ IFactoryResetInterface::IFactoryResetInterface::IFactoryResetInterface()
471 RegisterHandlers(functions); 486 RegisterHandlers(functions);
472} 487}
473 488
489IFactoryResetInterface::~IFactoryResetInterface() = default;
490
474NS::NS(const char* name) : ServiceFramework{name} { 491NS::NS(const char* name) : ServiceFramework{name} {
475 // clang-format off 492 // clang-format off
476 static const FunctionInfo functions[] = { 493 static const FunctionInfo functions[] = {
@@ -488,7 +505,9 @@ NS::NS(const char* name) : ServiceFramework{name} {
488 RegisterHandlers(functions); 505 RegisterHandlers(functions);
489} 506}
490 507
491std::shared_ptr<IApplicationManagerInterface> NS::GetApplicationManagerInterface() { 508NS::~NS() = default;
509
510std::shared_ptr<IApplicationManagerInterface> NS::GetApplicationManagerInterface() const {
492 return GetInterface<IApplicationManagerInterface>(); 511 return GetInterface<IApplicationManagerInterface>();
493} 512}
494 513
diff --git a/src/core/hle/service/ns/ns.h b/src/core/hle/service/ns/ns.h
index 155dd6831..0f4bab4cb 100644
--- a/src/core/hle/service/ns/ns.h
+++ b/src/core/hle/service/ns/ns.h
@@ -5,18 +5,19 @@
5#pragma once 5#pragma once
6 6
7#include "core/hle/service/service.h" 7#include "core/hle/service/service.h"
8#include "core/hle/service/set/set.h"
9 8
10namespace Service::NS { 9namespace Service::NS {
11 10
12class IAccountProxyInterface final : public ServiceFramework<IAccountProxyInterface> { 11class IAccountProxyInterface final : public ServiceFramework<IAccountProxyInterface> {
13public: 12public:
14 explicit IAccountProxyInterface(); 13 explicit IAccountProxyInterface();
14 ~IAccountProxyInterface();
15}; 15};
16 16
17class IApplicationManagerInterface final : public ServiceFramework<IApplicationManagerInterface> { 17class IApplicationManagerInterface final : public ServiceFramework<IApplicationManagerInterface> {
18public: 18public:
19 explicit IApplicationManagerInterface(); 19 explicit IApplicationManagerInterface();
20 ~IApplicationManagerInterface();
20 21
21 ResultVal<u8> GetApplicationDesiredLanguage(u32 supported_languages); 22 ResultVal<u8> GetApplicationDesiredLanguage(u32 supported_languages);
22 ResultVal<u64> ConvertApplicationLanguageToLanguageCode(u8 application_language); 23 ResultVal<u64> ConvertApplicationLanguageToLanguageCode(u8 application_language);
@@ -30,38 +31,45 @@ private:
30class IApplicationVersionInterface final : public ServiceFramework<IApplicationVersionInterface> { 31class IApplicationVersionInterface final : public ServiceFramework<IApplicationVersionInterface> {
31public: 32public:
32 explicit IApplicationVersionInterface(); 33 explicit IApplicationVersionInterface();
34 ~IApplicationVersionInterface();
33}; 35};
34 36
35class IContentManagerInterface final : public ServiceFramework<IContentManagerInterface> { 37class IContentManagerInterface final : public ServiceFramework<IContentManagerInterface> {
36public: 38public:
37 explicit IContentManagerInterface(); 39 explicit IContentManagerInterface();
40 ~IContentManagerInterface();
38}; 41};
39 42
40class IDocumentInterface final : public ServiceFramework<IDocumentInterface> { 43class IDocumentInterface final : public ServiceFramework<IDocumentInterface> {
41public: 44public:
42 explicit IDocumentInterface(); 45 explicit IDocumentInterface();
46 ~IDocumentInterface();
43}; 47};
44 48
45class IDownloadTaskInterface final : public ServiceFramework<IDownloadTaskInterface> { 49class IDownloadTaskInterface final : public ServiceFramework<IDownloadTaskInterface> {
46public: 50public:
47 explicit IDownloadTaskInterface(); 51 explicit IDownloadTaskInterface();
52 ~IDownloadTaskInterface();
48}; 53};
49 54
50class IECommerceInterface final : public ServiceFramework<IECommerceInterface> { 55class IECommerceInterface final : public ServiceFramework<IECommerceInterface> {
51public: 56public:
52 explicit IECommerceInterface(); 57 explicit IECommerceInterface();
58 ~IECommerceInterface();
53}; 59};
54 60
55class IFactoryResetInterface final : public ServiceFramework<IFactoryResetInterface> { 61class IFactoryResetInterface final : public ServiceFramework<IFactoryResetInterface> {
56public: 62public:
57 explicit IFactoryResetInterface(); 63 explicit IFactoryResetInterface();
64 ~IFactoryResetInterface();
58}; 65};
59 66
60class NS final : public ServiceFramework<NS> { 67class NS final : public ServiceFramework<NS> {
61public: 68public:
62 explicit NS(const char* name); 69 explicit NS(const char* name);
70 ~NS();
63 71
64 std::shared_ptr<IApplicationManagerInterface> GetApplicationManagerInterface(); 72 std::shared_ptr<IApplicationManagerInterface> GetApplicationManagerInterface() const;
65 73
66private: 74private:
67 template <typename T> 75 template <typename T>
@@ -74,7 +82,7 @@ private:
74 } 82 }
75 83
76 template <typename T> 84 template <typename T>
77 std::shared_ptr<T> GetInterface() { 85 std::shared_ptr<T> GetInterface() const {
78 static_assert(std::is_base_of_v<Kernel::SessionRequestHandler, T>, 86 static_assert(std::is_base_of_v<Kernel::SessionRequestHandler, T>,
79 "Not a base of ServiceFrameworkBase"); 87 "Not a base of ServiceFrameworkBase");
80 88
diff --git a/src/core/hle/service/ns/ns_language.h b/src/core/hle/service/ns/ns_language.h
index 55d7b0bd2..59ac85a19 100644
--- a/src/core/hle/service/ns/ns_language.h
+++ b/src/core/hle/service/ns/ns_language.h
@@ -1,4 +1,4 @@
1// Copyright 2018 yuzu emulator team 1// Copyright 2019 yuzu emulator team
2// Licensed under GPLv2 or any later version 2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included. 3// Refer to the license.txt file included.
4 4
@@ -32,7 +32,7 @@ using ApplicationLanguagePriorityList =
32 const std::array<ApplicationLanguage, static_cast<std::size_t>(ApplicationLanguage::Count)>; 32 const std::array<ApplicationLanguage, static_cast<std::size_t>(ApplicationLanguage::Count)>;
33 33
34constexpr u32 GetSupportedLanguageFlag(const ApplicationLanguage lang) { 34constexpr u32 GetSupportedLanguageFlag(const ApplicationLanguage lang) {
35 return 1u << static_cast<u32>(lang); 35 return 1U << static_cast<u32>(lang);
36} 36}
37 37
38const ApplicationLanguagePriorityList* GetApplicationLanguagePriorityList(ApplicationLanguage lang); 38const ApplicationLanguagePriorityList* GetApplicationLanguagePriorityList(ApplicationLanguage lang);