diff --git a/src/core/hle/service/acc/acc.cpp b/src/core/hle/service/acc/acc.cpp index 1f8ed265e8..8707be0052 100644 --- a/src/core/hle/service/acc/acc.cpp +++ b/src/core/hle/service/acc/acc.cpp @@ -48,7 +48,7 @@ class IProfile final : public ServiceFramework { public: explicit IProfile(UUID user_id, ProfileManager& profile_manager) : ServiceFramework("IProfile"), profile_manager(profile_manager), user_id(user_id) { - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, &IProfile::Get, "Get"}, {1, &IProfile::GetBase, "GetBase"}, {10, &IProfile::GetImageSize, "GetImageSize"}, @@ -137,7 +137,7 @@ private: class IManagerForApplication final : public ServiceFramework { public: IManagerForApplication() : ServiceFramework("IManagerForApplication") { - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, &IManagerForApplication::CheckAvailability, "CheckAvailability"}, {1, &IManagerForApplication::GetAccountId, "GetAccountId"}, {2, nullptr, "EnsureIdTokenCacheAsync"}, diff --git a/src/core/hle/service/acc/acc_aa.cpp b/src/core/hle/service/acc/acc_aa.cpp index e84d9f7cf3..ffa0883f89 100644 --- a/src/core/hle/service/acc/acc_aa.cpp +++ b/src/core/hle/service/acc/acc_aa.cpp @@ -8,7 +8,7 @@ namespace Service::Account { ACC_AA::ACC_AA(std::shared_ptr module, std::shared_ptr profile_manager) : Module::Interface(std::move(module), std::move(profile_manager), "acc:aa") { - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, nullptr, "EnsureCacheAsync"}, {1, nullptr, "LoadCache"}, {2, nullptr, "GetDeviceAccountId"}, diff --git a/src/core/hle/service/acc/acc_su.cpp b/src/core/hle/service/acc/acc_su.cpp index 5e20303553..49d71e187d 100644 --- a/src/core/hle/service/acc/acc_su.cpp +++ b/src/core/hle/service/acc/acc_su.cpp @@ -8,7 +8,7 @@ namespace Service::Account { ACC_SU::ACC_SU(std::shared_ptr module, std::shared_ptr profile_manager) : Module::Interface(std::move(module), std::move(profile_manager), "acc:su") { - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, &ACC_SU::GetUserCount, "GetUserCount"}, {1, &ACC_SU::GetUserExistence, "GetUserExistence"}, {2, &ACC_SU::ListAllUsers, "ListAllUsers"}, diff --git a/src/core/hle/service/acc/acc_u0.cpp b/src/core/hle/service/acc/acc_u0.cpp index a4d705b459..c36aa747e3 100644 --- a/src/core/hle/service/acc/acc_u0.cpp +++ b/src/core/hle/service/acc/acc_u0.cpp @@ -8,7 +8,7 @@ namespace Service::Account { ACC_U0::ACC_U0(std::shared_ptr module, std::shared_ptr profile_manager) : Module::Interface(std::move(module), std::move(profile_manager), "acc:u0") { - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, &ACC_U0::GetUserCount, "GetUserCount"}, {1, &ACC_U0::GetUserExistence, "GetUserExistence"}, {2, &ACC_U0::ListAllUsers, "ListAllUsers"}, diff --git a/src/core/hle/service/acc/acc_u1.cpp b/src/core/hle/service/acc/acc_u1.cpp index 8fffc93b53..d6f9ea56f7 100644 --- a/src/core/hle/service/acc/acc_u1.cpp +++ b/src/core/hle/service/acc/acc_u1.cpp @@ -8,7 +8,7 @@ namespace Service::Account { ACC_U1::ACC_U1(std::shared_ptr module, std::shared_ptr profile_manager) : Module::Interface(std::move(module), std::move(profile_manager), "acc:u1") { - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, &ACC_U1::GetUserCount, "GetUserCount"}, {1, &ACC_U1::GetUserExistence, "GetUserExistence"}, {2, &ACC_U1::ListAllUsers, "ListAllUsers"}, diff --git a/src/core/hle/service/am/am.cpp b/src/core/hle/service/am/am.cpp index 3a7b6da846..c957de14e1 100644 --- a/src/core/hle/service/am/am.cpp +++ b/src/core/hle/service/am/am.cpp @@ -54,7 +54,7 @@ static_assert(sizeof(LaunchParameters) == 0x88); IWindowController::IWindowController() : ServiceFramework("IWindowController") { // clang-format off - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, nullptr, "CreateWindow"}, {1, &IWindowController::GetAppletResourceUserId, "GetAppletResourceUserId"}, {10, &IWindowController::AcquireForegroundRights, "AcquireForegroundRights"}, @@ -84,7 +84,7 @@ void IWindowController::AcquireForegroundRights(Kernel::HLERequestContext& ctx) } IAudioController::IAudioController() : ServiceFramework("IAudioController") { - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, &IAudioController::SetExpectedMasterVolume, "SetExpectedMasterVolume"}, {1, &IAudioController::GetMainAppletExpectedMasterVolume, "GetMainAppletExpectedMasterVolume"}, @@ -120,7 +120,7 @@ void IAudioController::GetLibraryAppletExpectedMasterVolume(Kernel::HLERequestCo IDisplayController::IDisplayController() : ServiceFramework("IDisplayController") { // clang-format off - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, nullptr, "GetLastForegroundCaptureImage"}, {1, nullptr, "UpdateLastForegroundCaptureImage"}, {2, nullptr, "GetLastApplicationCaptureImage"}, @@ -166,7 +166,7 @@ IDebugFunctions::~IDebugFunctions() = default; ISelfController::ISelfController(std::shared_ptr nvflinger) : ServiceFramework("ISelfController"), nvflinger(std::move(nvflinger)) { // clang-format off - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, nullptr, "Exit"}, {1, &ISelfController::LockExit, "LockExit"}, {2, &ISelfController::UnlockExit, "UnlockExit"}, @@ -399,7 +399,7 @@ void AppletMessageQueue::OperationModeChanged() { ICommonStateGetter::ICommonStateGetter(std::shared_ptr msg_queue) : ServiceFramework("ICommonStateGetter"), msg_queue(std::move(msg_queue)) { // clang-format off - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, &ICommonStateGetter::GetEventHandle, "GetEventHandle"}, {1, &ICommonStateGetter::ReceiveMessage, "ReceiveMessage"}, {2, nullptr, "GetThisAppletKind"}, @@ -497,7 +497,7 @@ void ICommonStateGetter::GetDefaultDisplayResolution(Kernel::HLERequestContext& IStorage::IStorage(std::vector buffer) : ServiceFramework("IStorage"), buffer(std::move(buffer)) { // clang-format off - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, &IStorage::Open, "Open"}, {1, nullptr, "OpenTransferStorage"}, }; @@ -536,7 +536,7 @@ public: explicit ILibraryAppletAccessor(std::shared_ptr applet) : ServiceFramework("ILibraryAppletAccessor"), applet(std::move(applet)) { // clang-format off - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, &ILibraryAppletAccessor::GetAppletStateChangedEvent, "GetAppletStateChangedEvent"}, {1, &ILibraryAppletAccessor::IsCompleted, "IsCompleted"}, {10, &ILibraryAppletAccessor::Start, "Start"}, @@ -691,7 +691,7 @@ void IStorage::Open(Kernel::HLERequestContext& ctx) { IStorageAccessor::IStorageAccessor(IStorage& storage) : ServiceFramework("IStorageAccessor"), backing(storage) { // clang-format off - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, &IStorageAccessor::GetSize, "GetSize"}, {10, &IStorageAccessor::Write, "Write"}, {11, &IStorageAccessor::Read, "Read"}, @@ -758,7 +758,7 @@ void IStorageAccessor::Read(Kernel::HLERequestContext& ctx) { } ILibraryAppletCreator::ILibraryAppletCreator() : ServiceFramework("ILibraryAppletCreator") { - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, &ILibraryAppletCreator::CreateLibraryApplet, "CreateLibraryApplet"}, {1, nullptr, "TerminateAllLibraryApplets"}, {2, nullptr, "AreAnyLibraryAppletsLeft"}, @@ -848,7 +848,7 @@ void ILibraryAppletCreator::CreateTransferMemoryStorage(Kernel::HLERequestContex IApplicationFunctions::IApplicationFunctions() : ServiceFramework("IApplicationFunctions") { // clang-format off - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {1, &IApplicationFunctions::PopLaunchParameter, "PopLaunchParameter"}, {10, nullptr, "CreateApplicationAndPushAndRequestToStart"}, {11, nullptr, "CreateApplicationAndPushAndRequestToStartForQuest"}, @@ -1053,7 +1053,7 @@ void InstallInterfaces(SM::ServiceManager& service_manager, IHomeMenuFunctions::IHomeMenuFunctions() : ServiceFramework("IHomeMenuFunctions") { // clang-format off - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {10, &IHomeMenuFunctions::RequestToGetForeground, "RequestToGetForeground"}, {11, nullptr, "LockForeground"}, {12, nullptr, "UnlockForeground"}, @@ -1079,7 +1079,7 @@ void IHomeMenuFunctions::RequestToGetForeground(Kernel::HLERequestContext& ctx) IGlobalStateController::IGlobalStateController() : ServiceFramework("IGlobalStateController") { // clang-format off - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, nullptr, "RequestToEnterSleep"}, {1, nullptr, "EnterSleep"}, {2, nullptr, "StartSleepSequence"}, @@ -1101,7 +1101,7 @@ IGlobalStateController::~IGlobalStateController() = default; IApplicationCreator::IApplicationCreator() : ServiceFramework("IApplicationCreator") { // clang-format off - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, nullptr, "CreateApplication"}, {1, nullptr, "PopLaunchRequestedApplication"}, {10, nullptr, "CreateSystemApplication"}, @@ -1117,7 +1117,7 @@ IApplicationCreator::~IApplicationCreator() = default; IProcessWindingController::IProcessWindingController() : ServiceFramework("IProcessWindingController") { // clang-format off - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, nullptr, "GetLaunchReason"}, {11, nullptr, "OpenCallingLibraryApplet"}, {21, nullptr, "PushContext"}, diff --git a/src/core/hle/service/am/applet_ae.cpp b/src/core/hle/service/am/applet_ae.cpp index 41a573a91a..a466e4ece1 100644 --- a/src/core/hle/service/am/applet_ae.cpp +++ b/src/core/hle/service/am/applet_ae.cpp @@ -16,7 +16,7 @@ public: std::shared_ptr msg_queue) : ServiceFramework("ILibraryAppletProxy"), nvflinger(std::move(nvflinger)), msg_queue(std::move(msg_queue)) { - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, &ILibraryAppletProxy::GetCommonStateGetter, "GetCommonStateGetter"}, {1, &ILibraryAppletProxy::GetSelfController, "GetSelfController"}, {2, &ILibraryAppletProxy::GetWindowController, "GetWindowController"}, @@ -113,7 +113,7 @@ public: std::shared_ptr msg_queue) : ServiceFramework("ISystemAppletProxy"), nvflinger(std::move(nvflinger)), msg_queue(std::move(msg_queue)) { - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, &ISystemAppletProxy::GetCommonStateGetter, "GetCommonStateGetter"}, {1, &ISystemAppletProxy::GetSelfController, "GetSelfController"}, {2, &ISystemAppletProxy::GetWindowController, "GetWindowController"}, @@ -242,7 +242,7 @@ AppletAE::AppletAE(std::shared_ptr nvflinger, : ServiceFramework("appletAE"), nvflinger(std::move(nvflinger)), msg_queue(std::move(msg_queue)) { // clang-format off - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {100, &AppletAE::OpenSystemAppletProxy, "OpenSystemAppletProxy"}, {200, &AppletAE::OpenLibraryAppletProxyOld, "OpenLibraryAppletProxyOld"}, {201, &AppletAE::OpenLibraryAppletProxy, "OpenLibraryAppletProxy"}, diff --git a/src/core/hle/service/am/applet_oe.cpp b/src/core/hle/service/am/applet_oe.cpp index d3a0a15689..8a10973ca1 100644 --- a/src/core/hle/service/am/applet_oe.cpp +++ b/src/core/hle/service/am/applet_oe.cpp @@ -17,7 +17,7 @@ public: : ServiceFramework("IApplicationProxy"), nvflinger(std::move(nvflinger)), msg_queue(std::move(msg_queue)) { // clang-format off - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, &IApplicationProxy::GetCommonStateGetter, "GetCommonStateGetter"}, {1, &IApplicationProxy::GetSelfController, "GetSelfController"}, {2, &IApplicationProxy::GetWindowController, "GetWindowController"}, @@ -114,7 +114,7 @@ AppletOE::AppletOE(std::shared_ptr nvflinger, std::shared_ptr msg_queue) : ServiceFramework("appletOE"), nvflinger(std::move(nvflinger)), msg_queue(std::move(msg_queue)) { - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, &AppletOE::OpenApplicationProxy, "OpenApplicationProxy"}, }; RegisterHandlers(functions); diff --git a/src/core/hle/service/am/idle.cpp b/src/core/hle/service/am/idle.cpp index f814fe2c09..ce4802aade 100644 --- a/src/core/hle/service/am/idle.cpp +++ b/src/core/hle/service/am/idle.cpp @@ -8,7 +8,7 @@ namespace Service::AM { IdleSys::IdleSys() : ServiceFramework{"idle:sys"} { // clang-format off - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, nullptr, "GetAutoPowerDownEvent"}, {1, nullptr, "Unknown1"}, {2, nullptr, "Unknown2"}, diff --git a/src/core/hle/service/am/omm.cpp b/src/core/hle/service/am/omm.cpp index 6ab3fb9068..04def00394 100644 --- a/src/core/hle/service/am/omm.cpp +++ b/src/core/hle/service/am/omm.cpp @@ -8,7 +8,7 @@ namespace Service::AM { OMM::OMM() : ServiceFramework{"omm"} { // clang-format off - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, nullptr, "GetOperationMode"}, {1, nullptr, "GetOperationModeChangeEvent"}, {2, nullptr, "EnableAudioVisual"}, diff --git a/src/core/hle/service/am/spsm.cpp b/src/core/hle/service/am/spsm.cpp index 003ee86675..02eeeee674 100644 --- a/src/core/hle/service/am/spsm.cpp +++ b/src/core/hle/service/am/spsm.cpp @@ -8,7 +8,7 @@ namespace Service::AM { SPSM::SPSM() : ServiceFramework{"spsm"} { // clang-format off - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, nullptr, "GetState"}, {1, nullptr, "SleepSystemAndWaitAwake"}, {2, nullptr, "Unknown1"}, diff --git a/src/core/hle/service/am/tcap.cpp b/src/core/hle/service/am/tcap.cpp index a75cbdda8b..7bbf1f21ef 100644 --- a/src/core/hle/service/am/tcap.cpp +++ b/src/core/hle/service/am/tcap.cpp @@ -8,7 +8,7 @@ namespace Service::AM { TCAP::TCAP() : ServiceFramework{"tcap"} { // clang-format off - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, nullptr, "GetContinuousHighSkinTemperatureEvent"}, {1, nullptr, "SetOperationMode"}, {2, nullptr, "LoadAndApplySettings"}, diff --git a/src/core/hle/service/aoc/aoc_u.cpp b/src/core/hle/service/aoc/aoc_u.cpp index b506bc3dd0..e05269f2a4 100644 --- a/src/core/hle/service/aoc/aoc_u.cpp +++ b/src/core/hle/service/aoc/aoc_u.cpp @@ -50,7 +50,7 @@ static std::vector AccumulateAOCTitleIDs() { } AOC_U::AOC_U() : ServiceFramework("aoc:u"), add_on_content(AccumulateAOCTitleIDs()) { - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, nullptr, "CountAddOnContentByApplicationId"}, {1, nullptr, "ListAddOnContentByApplicationId"}, {2, &AOC_U::CountAddOnContent, "CountAddOnContent"}, diff --git a/src/core/hle/service/apm/interface.cpp b/src/core/hle/service/apm/interface.cpp index fcacbab72f..ddfab01fae 100644 --- a/src/core/hle/service/apm/interface.cpp +++ b/src/core/hle/service/apm/interface.cpp @@ -12,7 +12,7 @@ namespace Service::APM { class ISession final : public ServiceFramework { public: ISession() : ServiceFramework("ISession") { - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, &ISession::SetPerformanceConfiguration, "SetPerformanceConfiguration"}, {1, &ISession::GetPerformanceConfiguration, "GetPerformanceConfiguration"}, }; @@ -61,7 +61,7 @@ private: APM::APM(std::shared_ptr apm, const char* name) : ServiceFramework(name), apm(std::move(apm)) { - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, &APM::OpenSession, "OpenSession"}, {1, nullptr, "GetPerformanceMode"}, }; @@ -80,7 +80,7 @@ void APM::OpenSession(Kernel::HLERequestContext& ctx) { APM_Sys::APM_Sys() : ServiceFramework{"apm:sys"} { // clang-format off - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, nullptr, "RequestPerformanceMode"}, {1, &APM_Sys::GetPerformanceEvent, "GetPerformanceEvent"}, {2, nullptr, "GetThrottlingState"}, diff --git a/src/core/hle/service/arp/arp.cpp b/src/core/hle/service/arp/arp.cpp index e675b0188a..28165ef1c3 100644 --- a/src/core/hle/service/arp/arp.cpp +++ b/src/core/hle/service/arp/arp.cpp @@ -17,7 +17,7 @@ class ARP_R final : public ServiceFramework { public: explicit ARP_R() : ServiceFramework{"arp:r"} { // clang-format off - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, nullptr, "GetApplicationLaunchProperty"}, {1, nullptr, "GetApplicationLaunchPropertyWithApplicationId"}, {2, nullptr, "GetApplicationControlProperty"}, @@ -33,7 +33,7 @@ class IRegistrar final : public ServiceFramework { public: explicit IRegistrar() : ServiceFramework{"IRegistrar"} { // clang-format off - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, nullptr, "Issue"}, {1, nullptr, "SetApplicationLaunchProperty"}, {2, nullptr, "SetApplicationControlProperty"}, @@ -48,7 +48,7 @@ class ARP_W final : public ServiceFramework { public: explicit ARP_W() : ServiceFramework{"arp:w"} { // clang-format off - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, &ARP_W::AcquireRegistrar, "AcquireRegistrar"}, {1, nullptr, "DeleteProperties"}, }; diff --git a/src/core/hle/service/audio/audctl.cpp b/src/core/hle/service/audio/audctl.cpp index b6b71f9666..751d0fb5a2 100644 --- a/src/core/hle/service/audio/audctl.cpp +++ b/src/core/hle/service/audio/audctl.cpp @@ -8,7 +8,7 @@ namespace Service::Audio { AudCtl::AudCtl() : ServiceFramework{"audctl"} { // clang-format off - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, nullptr, "GetTargetVolume"}, {1, nullptr, "SetTargetVolume"}, {2, nullptr, "GetTargetVolumeMin"}, diff --git a/src/core/hle/service/audio/auddbg.cpp b/src/core/hle/service/audio/auddbg.cpp index 8fff3e4b4d..207435a1e4 100644 --- a/src/core/hle/service/audio/auddbg.cpp +++ b/src/core/hle/service/audio/auddbg.cpp @@ -8,7 +8,7 @@ namespace Service::Audio { AudDbg::AudDbg(const char* name) : ServiceFramework{name} { // clang-format off - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, nullptr, "RequestSuspendForDebug"}, {1, nullptr, "RequestResumeForDebug"}, }; diff --git a/src/core/hle/service/audio/audin_a.cpp b/src/core/hle/service/audio/audin_a.cpp index ddd12f35ed..98cdc825f4 100644 --- a/src/core/hle/service/audio/audin_a.cpp +++ b/src/core/hle/service/audio/audin_a.cpp @@ -8,7 +8,7 @@ namespace Service::Audio { AudInA::AudInA() : ServiceFramework{"audin:a"} { // clang-format off - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, nullptr, "RequestSuspendAudioIns"}, {1, nullptr, "RequestResumeAudioIns"}, {2, nullptr, "GetAudioInsProcessMasterVolume"}, diff --git a/src/core/hle/service/audio/audin_u.cpp b/src/core/hle/service/audio/audin_u.cpp index 6570103123..8fd22c71d7 100644 --- a/src/core/hle/service/audio/audin_u.cpp +++ b/src/core/hle/service/audio/audin_u.cpp @@ -12,7 +12,7 @@ namespace Service::Audio { class IAudioIn final : public ServiceFramework { public: IAudioIn() : ServiceFramework("IAudioIn") { - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, nullptr, "GetAudioInState"}, {1, nullptr, "StartAudioIn"}, {2, nullptr, "StopAudioIn"}, @@ -34,7 +34,7 @@ public: }; AudInU::AudInU() : ServiceFramework("audin:u") { - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, nullptr, "ListAudioIns"}, {1, nullptr, "OpenAudioIn"}, {2, nullptr, "Unknown"}, {3, nullptr, "OpenAudioInAuto"}, {4, nullptr, "ListAudioInsAuto"}, }; diff --git a/src/core/hle/service/audio/audout_a.cpp b/src/core/hle/service/audio/audout_a.cpp index 85febbca37..5c2c78def6 100644 --- a/src/core/hle/service/audio/audout_a.cpp +++ b/src/core/hle/service/audio/audout_a.cpp @@ -8,7 +8,7 @@ namespace Service::Audio { AudOutA::AudOutA() : ServiceFramework{"audout:a"} { // clang-format off - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, nullptr, "RequestSuspendAudioOuts"}, {1, nullptr, "RequestResumeAudioOuts"}, {2, nullptr, "GetAudioOutsProcessMasterVolume"}, diff --git a/src/core/hle/service/audio/audout_u.cpp b/src/core/hle/service/audio/audout_u.cpp index dc6a6b1885..dc969e5d28 100644 --- a/src/core/hle/service/audio/audout_u.cpp +++ b/src/core/hle/service/audio/audout_u.cpp @@ -51,7 +51,7 @@ public: : ServiceFramework("IAudioOut"), audio_core(audio_core), device_name(std::move(device_name)), audio_params(audio_params) { - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, &IAudioOut::GetAudioOutState, "GetAudioOutState"}, {1, &IAudioOut::StartAudioOut, "StartAudioOut"}, {2, &IAudioOut::StopAudioOut, "StopAudioOut"}, @@ -247,10 +247,15 @@ void AudOutU::OpenAudioOutImpl(Kernel::HLERequestContext& ctx) { } AudOutU::AudOutU() : ServiceFramework("audout:u") { - static const FunctionInfo functions[] = {{0, &AudOutU::ListAudioOutsImpl, "ListAudioOuts"}, - {1, &AudOutU::OpenAudioOutImpl, "OpenAudioOut"}, - {2, &AudOutU::ListAudioOutsImpl, "ListAudioOutsAuto"}, - {3, &AudOutU::OpenAudioOutImpl, "OpenAudioOutAuto"}}; + // clang-format off + static constexpr FunctionInfo functions[] = { + {0, &AudOutU::ListAudioOutsImpl, "ListAudioOuts"}, + {1, &AudOutU::OpenAudioOutImpl, "OpenAudioOut"}, + {2, &AudOutU::ListAudioOutsImpl, "ListAudioOutsAuto"}, + {3, &AudOutU::OpenAudioOutImpl, "OpenAudioOutAuto"}, + }; + // clang-format on + RegisterHandlers(functions); audio_core = std::make_unique(); } diff --git a/src/core/hle/service/audio/audrec_a.cpp b/src/core/hle/service/audio/audrec_a.cpp index ce1bfb48d4..1aca7b193a 100644 --- a/src/core/hle/service/audio/audrec_a.cpp +++ b/src/core/hle/service/audio/audrec_a.cpp @@ -8,7 +8,7 @@ namespace Service::Audio { AudRecA::AudRecA() : ServiceFramework{"audrec:a"} { // clang-format off - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, nullptr, "RequestSuspendFinalOutputRecorders"}, {1, nullptr, "RequestResumeFinalOutputRecorders"}, }; diff --git a/src/core/hle/service/audio/audrec_u.cpp b/src/core/hle/service/audio/audrec_u.cpp index 34974afa98..41b9976c92 100644 --- a/src/core/hle/service/audio/audrec_u.cpp +++ b/src/core/hle/service/audio/audrec_u.cpp @@ -12,7 +12,7 @@ namespace Service::Audio { class IFinalOutputRecorder final : public ServiceFramework { public: IFinalOutputRecorder() : ServiceFramework("IFinalOutputRecorder") { - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, nullptr, "GetFinalOutputRecorderState"}, {1, nullptr, "StartFinalOutputRecorder"}, {2, nullptr, "StopFinalOutputRecorder"}, @@ -30,7 +30,7 @@ public: }; AudRecU::AudRecU() : ServiceFramework("audrec:u") { - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, nullptr, "OpenFinalOutputRecorder"}, }; RegisterHandlers(functions); diff --git a/src/core/hle/service/audio/audren_a.cpp b/src/core/hle/service/audio/audren_a.cpp index edb66d9857..655ce7313f 100644 --- a/src/core/hle/service/audio/audren_a.cpp +++ b/src/core/hle/service/audio/audren_a.cpp @@ -8,7 +8,7 @@ namespace Service::Audio { AudRenA::AudRenA() : ServiceFramework{"audren:a"} { // clang-format off - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, nullptr, "RequestSuspendAudioRenderers"}, {1, nullptr, "RequestResumeAudioRenderers"}, {2, nullptr, "GetAudioRenderersProcessMasterVolume"}, diff --git a/src/core/hle/service/audio/audren_u.cpp b/src/core/hle/service/audio/audren_u.cpp index 945259c7d0..8603d75cb5 100644 --- a/src/core/hle/service/audio/audren_u.cpp +++ b/src/core/hle/service/audio/audren_u.cpp @@ -25,7 +25,7 @@ public: explicit IAudioRenderer(AudioCore::AudioRendererParameter audren_params) : ServiceFramework("IAudioRenderer") { // clang-format off - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, &IAudioRenderer::GetSampleRate, "GetSampleRate"}, {1, &IAudioRenderer::GetSampleCount, "GetSampleCount"}, {2, &IAudioRenderer::GetMixBufferCount, "GetMixBufferCount"}, @@ -145,7 +145,7 @@ private: class IAudioDevice final : public ServiceFramework { public: IAudioDevice() : ServiceFramework("IAudioDevice") { - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, &IAudioDevice::ListAudioDeviceName, "ListAudioDeviceName"}, {1, &IAudioDevice::SetAudioDeviceOutputVolume, "SetAudioDeviceOutputVolume"}, {2, nullptr, "GetAudioDeviceOutputVolume"}, @@ -229,7 +229,7 @@ private: }; // namespace Audio AudRenU::AudRenU() : ServiceFramework("audren:u") { - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, &AudRenU::OpenAudioRenderer, "OpenAudioRenderer"}, {1, &AudRenU::GetAudioRendererWorkBufferSize, "GetAudioRendererWorkBufferSize"}, {2, &AudRenU::GetAudioDevice, "GetAudioDevice"}, diff --git a/src/core/hle/service/audio/codecctl.cpp b/src/core/hle/service/audio/codecctl.cpp index c6864146dd..8162f0b9e3 100644 --- a/src/core/hle/service/audio/codecctl.cpp +++ b/src/core/hle/service/audio/codecctl.cpp @@ -10,7 +10,7 @@ namespace Service::Audio { CodecCtl::CodecCtl() : ServiceFramework("codecctl") { - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, nullptr, "InitializeCodecController"}, {1, nullptr, "FinalizeCodecController"}, {2, nullptr, "SleepCodecController"}, diff --git a/src/core/hle/service/audio/hwopus.cpp b/src/core/hle/service/audio/hwopus.cpp index a850cadc87..900d286107 100644 --- a/src/core/hle/service/audio/hwopus.cpp +++ b/src/core/hle/service/audio/hwopus.cpp @@ -30,7 +30,7 @@ public: u32 channel_count) : ServiceFramework("IHardwareOpusDecoderManager"), decoder(std::move(decoder)), sample_rate(sample_rate), channel_count(channel_count) { - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, &IHardwareOpusDecoderManager::DecodeInterleaved, "DecodeInterleaved"}, {1, nullptr, "SetContext"}, {2, nullptr, "DecodeInterleavedForMultiStream"}, @@ -204,7 +204,7 @@ void HwOpus::OpenOpusDecoder(Kernel::HLERequestContext& ctx) { } HwOpus::HwOpus() : ServiceFramework("hwopus") { - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, &HwOpus::OpenOpusDecoder, "OpenOpusDecoder"}, {1, &HwOpus::GetWorkBufferSize, "GetWorkBufferSize"}, {2, nullptr, "OpenOpusDecoderForMultiStream"}, diff --git a/src/core/hle/service/bcat/bcat.cpp b/src/core/hle/service/bcat/bcat.cpp index 179aa49499..cddf86b470 100644 --- a/src/core/hle/service/bcat/bcat.cpp +++ b/src/core/hle/service/bcat/bcat.cpp @@ -8,7 +8,7 @@ namespace Service::BCAT { BCAT::BCAT(std::shared_ptr module, const char* name) : Module::Interface(std::move(module), name) { - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, &BCAT::CreateBcatService, "CreateBcatService"}, }; RegisterHandlers(functions); diff --git a/src/core/hle/service/bcat/module.cpp b/src/core/hle/service/bcat/module.cpp index b7bd738fcb..ae13652418 100644 --- a/src/core/hle/service/bcat/module.cpp +++ b/src/core/hle/service/bcat/module.cpp @@ -12,7 +12,7 @@ namespace Service::BCAT { class IBcatService final : public ServiceFramework { public: IBcatService() : ServiceFramework("IBcatService") { - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {10100, nullptr, "RequestSyncDeliveryCache"}, {10101, nullptr, "RequestSyncDeliveryCacheWithDirectoryName"}, {10200, nullptr, "CancelSyncDeliveryCacheRequest"}, diff --git a/src/core/hle/service/bpc/bpc.cpp b/src/core/hle/service/bpc/bpc.cpp index 1c1ecdb602..13c282bd5a 100644 --- a/src/core/hle/service/bpc/bpc.cpp +++ b/src/core/hle/service/bpc/bpc.cpp @@ -14,7 +14,7 @@ class BPC final : public ServiceFramework { public: explicit BPC() : ServiceFramework{"bpc"} { // clang-format off - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, nullptr, "ShutdownSystem"}, {1, nullptr, "RebootSystem"}, {2, nullptr, "GetWakeupReason"}, @@ -37,7 +37,7 @@ class BPC_R final : public ServiceFramework { public: explicit BPC_R() : ServiceFramework{"bpc:r"} { // clang-format off - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, nullptr, "GetExternalRtcValue"}, {1, nullptr, "SetExternalRtcValue"}, {2, nullptr, "ReadExternalRtcResetFlag"}, diff --git a/src/core/hle/service/btdrv/btdrv.cpp b/src/core/hle/service/btdrv/btdrv.cpp index 5704ca0aba..e620aa5dee 100644 --- a/src/core/hle/service/btdrv/btdrv.cpp +++ b/src/core/hle/service/btdrv/btdrv.cpp @@ -18,7 +18,7 @@ class Bt final : public ServiceFramework { public: explicit Bt() : ServiceFramework{"bt"} { // clang-format off - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, nullptr, "Unknown0"}, {1, nullptr, "Unknown1"}, {2, nullptr, "Unknown2"}, @@ -54,7 +54,7 @@ class BtDrv final : public ServiceFramework { public: explicit BtDrv() : ServiceFramework{"btdrv"} { // clang-format off - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, nullptr, "Unknown"}, {1, nullptr, "Init"}, {2, nullptr, "Enable"}, diff --git a/src/core/hle/service/btm/btm.cpp b/src/core/hle/service/btm/btm.cpp index ef7398a236..47c5b5535c 100644 --- a/src/core/hle/service/btm/btm.cpp +++ b/src/core/hle/service/btm/btm.cpp @@ -19,7 +19,7 @@ class IBtmUserCore final : public ServiceFramework { public: explicit IBtmUserCore() : ServiceFramework{"IBtmUserCore"} { // clang-format off - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, &IBtmUserCore::GetScanEvent, "GetScanEvent"}, {1, nullptr, "Unknown1"}, {2, nullptr, "Unknown2"}, @@ -110,7 +110,7 @@ class BTM_USR final : public ServiceFramework { public: explicit BTM_USR() : ServiceFramework{"btm:u"} { // clang-format off - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, &BTM_USR::GetCoreImpl, "GetCoreImpl"}, }; // clang-format on @@ -131,7 +131,7 @@ class BTM final : public ServiceFramework { public: explicit BTM() : ServiceFramework{"btm"} { // clang-format off - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, nullptr, "Unknown1"}, {1, nullptr, "Unknown2"}, {2, nullptr, "RegisterSystemEventForConnectedDeviceConditionImpl"}, @@ -165,7 +165,7 @@ class BTM_DBG final : public ServiceFramework { public: explicit BTM_DBG() : ServiceFramework{"btm:dbg"} { // clang-format off - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, nullptr, "RegisterSystemEventForDiscoveryImpl"}, {1, nullptr, "Unknown1"}, {2, nullptr, "Unknown2"}, @@ -186,7 +186,7 @@ class IBtmSystemCore final : public ServiceFramework { public: explicit IBtmSystemCore() : ServiceFramework{"IBtmSystemCore"} { // clang-format off - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, nullptr, "StartGamepadPairingImpl"}, {1, nullptr, "CancelGamepadPairingImpl"}, {2, nullptr, "ClearGamepadPairingDatabaseImpl"}, @@ -208,7 +208,7 @@ class BTM_SYS final : public ServiceFramework { public: explicit BTM_SYS() : ServiceFramework{"btm:sys"} { // clang-format off - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, &BTM_SYS::GetCoreImpl, "GetCoreImpl"}, }; // clang-format on diff --git a/src/core/hle/service/caps/caps.cpp b/src/core/hle/service/caps/caps.cpp index ae7b0720bd..485f950db1 100644 --- a/src/core/hle/service/caps/caps.cpp +++ b/src/core/hle/service/caps/caps.cpp @@ -14,7 +14,7 @@ class CAPS_A final : public ServiceFramework { public: explicit CAPS_A() : ServiceFramework{"caps:a"} { // clang-format off - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, nullptr, "Unknown1"}, {1, nullptr, "Unknown2"}, {2, nullptr, "Unknown3"}, @@ -52,7 +52,7 @@ class CAPS_C final : public ServiceFramework { public: explicit CAPS_C() : ServiceFramework{"caps:c"} { // clang-format off - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {2001, nullptr, "Unknown1"}, {2002, nullptr, "Unknown2"}, {2011, nullptr, "Unknown3"}, @@ -74,7 +74,7 @@ class CAPS_SC final : public ServiceFramework { public: explicit CAPS_SC() : ServiceFramework{"caps:sc"} { // clang-format off - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {1, nullptr, "Unknown1"}, {2, nullptr, "Unknown2"}, {1001, nullptr, "Unknown3"}, @@ -96,7 +96,7 @@ class CAPS_SS final : public ServiceFramework { public: explicit CAPS_SS() : ServiceFramework{"caps:ss"} { // clang-format off - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {201, nullptr, "Unknown1"}, {202, nullptr, "Unknown2"}, {203, nullptr, "Unknown3"}, @@ -112,7 +112,7 @@ class CAPS_SU final : public ServiceFramework { public: explicit CAPS_SU() : ServiceFramework{"caps:su"} { // clang-format off - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {201, nullptr, "SaveScreenShot"}, {203, nullptr, "SaveScreenShotEx0"}, }; @@ -126,7 +126,7 @@ class CAPS_U final : public ServiceFramework { public: explicit CAPS_U() : ServiceFramework{"caps:u"} { // clang-format off - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {102, nullptr, "GetAlbumFileListByAruid"}, {103, nullptr, "DeleteAlbumFileByAruid"}, {104, nullptr, "GetAlbumFileSizeByAruid"}, diff --git a/src/core/hle/service/erpt/erpt.cpp b/src/core/hle/service/erpt/erpt.cpp index d9b32954ee..470833a8fb 100644 --- a/src/core/hle/service/erpt/erpt.cpp +++ b/src/core/hle/service/erpt/erpt.cpp @@ -14,7 +14,7 @@ class ErrorReportContext final : public ServiceFramework { public: explicit ErrorReportContext() : ServiceFramework{"erpt:c"} { // clang-format off - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, nullptr, "SubmitContext"}, {1, nullptr, "CreateReport"}, {2, nullptr, "SetInitialLaunchSettingsCompletionTime"}, @@ -35,7 +35,7 @@ class ErrorReportSession final : public ServiceFramework { public: explicit ErrorReportSession() : ServiceFramework{"erpt:r"} { // clang-format off - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, nullptr, "OpenReport"}, {1, nullptr, "OpenManager"}, }; diff --git a/src/core/hle/service/es/es.cpp b/src/core/hle/service/es/es.cpp index 6701cb9135..3d4fa130a0 100644 --- a/src/core/hle/service/es/es.cpp +++ b/src/core/hle/service/es/es.cpp @@ -10,7 +10,7 @@ class ETicket final : public ServiceFramework { public: explicit ETicket() : ServiceFramework{"es"} { // clang-format off - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {1, nullptr, "ImportTicket"}, {2, nullptr, "ImportTicketCertificateSet"}, {3, nullptr, "DeleteTicket"}, diff --git a/src/core/hle/service/eupld/eupld.cpp b/src/core/hle/service/eupld/eupld.cpp index 2df30acee3..03309146e1 100644 --- a/src/core/hle/service/eupld/eupld.cpp +++ b/src/core/hle/service/eupld/eupld.cpp @@ -14,7 +14,7 @@ class ErrorUploadContext final : public ServiceFramework { public: explicit ErrorUploadContext() : ServiceFramework{"eupld:c"} { // clang-format off - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, nullptr, "SetUrl"}, {1, nullptr, "ImportCrt"}, {2, nullptr, "ImportPki"}, @@ -30,7 +30,7 @@ class ErrorUploadRequest final : public ServiceFramework { public: explicit ErrorUploadRequest() : ServiceFramework{"eupld:r"} { // clang-format off - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, nullptr, "Initialize"}, {1, nullptr, "UploadAll"}, {2, nullptr, "UploadSelected"}, diff --git a/src/core/hle/service/fatal/fatal_u.cpp b/src/core/hle/service/fatal/fatal_u.cpp index 1572a20517..7a005e93ed 100644 --- a/src/core/hle/service/fatal/fatal_u.cpp +++ b/src/core/hle/service/fatal/fatal_u.cpp @@ -7,7 +7,7 @@ namespace Service::Fatal { Fatal_U::Fatal_U(std::shared_ptr module) : Module::Interface(std::move(module), "fatal:u") { - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, &Fatal_U::ThrowFatal, "ThrowFatal"}, {1, &Fatal_U::ThrowFatalWithPolicy, "ThrowFatalWithPolicy"}, {2, &Fatal_U::ThrowFatalWithCpuContext, "ThrowFatalWithCpuContext"}, diff --git a/src/core/hle/service/fgm/fgm.cpp b/src/core/hle/service/fgm/fgm.cpp index e461274c12..e4286321ce 100644 --- a/src/core/hle/service/fgm/fgm.cpp +++ b/src/core/hle/service/fgm/fgm.cpp @@ -16,7 +16,7 @@ class IRequest final : public ServiceFramework { public: explicit IRequest() : ServiceFramework{"IRequest"} { // clang-format off - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, nullptr, "Initialize"}, {1, nullptr, "Set"}, {2, nullptr, "Get"}, @@ -32,7 +32,7 @@ class FGM final : public ServiceFramework { public: explicit FGM(const char* name) : ServiceFramework{name} { // clang-format off - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, &FGM::Initialize, "Initialize"}, }; // clang-format on @@ -54,7 +54,7 @@ class FGM_DBG final : public ServiceFramework { public: explicit FGM_DBG() : ServiceFramework{"fgm:dbg"} { // clang-format off - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, nullptr, "Initialize"}, {1, nullptr, "Read"}, {2, nullptr, "Cancel"}, diff --git a/src/core/hle/service/filesystem/fsp_ldr.cpp b/src/core/hle/service/filesystem/fsp_ldr.cpp index fb487d5bc6..75dc6180e2 100644 --- a/src/core/hle/service/filesystem/fsp_ldr.cpp +++ b/src/core/hle/service/filesystem/fsp_ldr.cpp @@ -9,7 +9,7 @@ namespace Service::FileSystem { FSP_LDR::FSP_LDR() : ServiceFramework{"fsp:ldr"} { // clang-format off - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, nullptr, "OpenCodeFileSystem"}, {1, nullptr, "IsArchivedProgram"}, {2, nullptr, "SetCurrentProcess"}, diff --git a/src/core/hle/service/filesystem/fsp_pr.cpp b/src/core/hle/service/filesystem/fsp_pr.cpp index 3782016103..57f0952449 100644 --- a/src/core/hle/service/filesystem/fsp_pr.cpp +++ b/src/core/hle/service/filesystem/fsp_pr.cpp @@ -9,7 +9,7 @@ namespace Service::FileSystem { FSP_PR::FSP_PR() : ServiceFramework{"fsp:pr"} { // clang-format off - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, nullptr, "RegisterProgram"}, {1, nullptr, "UnregisterProgram"}, {2, nullptr, "SetCurrentProcess"}, diff --git a/src/core/hle/service/filesystem/fsp_srv.cpp b/src/core/hle/service/filesystem/fsp_srv.cpp index 74c4e583bf..8e21fa5627 100644 --- a/src/core/hle/service/filesystem/fsp_srv.cpp +++ b/src/core/hle/service/filesystem/fsp_srv.cpp @@ -44,7 +44,7 @@ class IStorage final : public ServiceFramework { public: explicit IStorage(FileSys::VirtualFile backend_) : ServiceFramework("IStorage"), backend(std::move(backend_)) { - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, &IStorage::Read, "Read"}, {1, nullptr, "Write"}, {2, nullptr, "Flush"}, @@ -102,7 +102,7 @@ class IFile final : public ServiceFramework { public: explicit IFile(FileSys::VirtualFile backend_) : ServiceFramework("IFile"), backend(std::move(backend_)) { - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, &IFile::Read, "Read"}, {1, &IFile::Write, "Write"}, {2, &IFile::Flush, "Flush"}, {3, &IFile::SetSize, "SetSize"}, {4, &IFile::GetSize, "GetSize"}, {5, nullptr, "OperateRange"}, @@ -232,7 +232,7 @@ class IDirectory final : public ServiceFramework { public: explicit IDirectory(FileSys::VirtualDir backend_) : ServiceFramework("IDirectory"), backend(std::move(backend_)) { - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, &IDirectory::Read, "Read"}, {1, &IDirectory::GetEntryCount, "GetEntryCount"}, }; @@ -291,7 +291,7 @@ class IFileSystem final : public ServiceFramework { public: explicit IFileSystem(FileSys::VirtualDir backend) : ServiceFramework("IFileSystem"), backend(std::move(backend)) { - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, &IFileSystem::CreateFile, "CreateFile"}, {1, &IFileSystem::DeleteFile, "DeleteFile"}, {2, &IFileSystem::CreateDirectory, "CreateDirectory"}, @@ -487,7 +487,7 @@ class ISaveDataInfoReader final : public ServiceFramework { public: explicit ISaveDataInfoReader(FileSys::SaveDataSpaceId space) : ServiceFramework("ISaveDataInfoReader") { - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, &ISaveDataInfoReader::ReadSaveDataInfo, "ReadSaveDataInfo"}, }; RegisterHandlers(functions); @@ -626,7 +626,7 @@ private: FSP_SRV::FSP_SRV() : ServiceFramework("fsp-srv") { // clang-format off - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, nullptr, "MountContent"}, {1, &FSP_SRV::Initialize, "Initialize"}, {2, nullptr, "OpenDataFileSystemByCurrentProcess"}, diff --git a/src/core/hle/service/friend/friend.cpp b/src/core/hle/service/friend/friend.cpp index d9225d6244..231036ab3c 100644 --- a/src/core/hle/service/friend/friend.cpp +++ b/src/core/hle/service/friend/friend.cpp @@ -12,7 +12,7 @@ namespace Service::Friend { class IFriendService final : public ServiceFramework { public: IFriendService() : ServiceFramework("IFriendService") { - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, nullptr, "GetCompletionEvent"}, {1, nullptr, "Cancel"}, {10100, nullptr, "GetFriendListIds"}, diff --git a/src/core/hle/service/friend/interface.cpp b/src/core/hle/service/friend/interface.cpp index 5a6840af5b..f6eac57cc5 100644 --- a/src/core/hle/service/friend/interface.cpp +++ b/src/core/hle/service/friend/interface.cpp @@ -8,7 +8,7 @@ namespace Service::Friend { Friend::Friend(std::shared_ptr module, const char* name) : Interface(std::move(module), name) { - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, &Friend::CreateFriendService, "CreateFriendService"}, {1, nullptr, "CreateNotificationService"}, {2, nullptr, "CreateDaemonSuspendSessionService"}, diff --git a/src/core/hle/service/grc/grc.cpp b/src/core/hle/service/grc/grc.cpp index 24910ac6c5..6afd08e06c 100644 --- a/src/core/hle/service/grc/grc.cpp +++ b/src/core/hle/service/grc/grc.cpp @@ -14,7 +14,7 @@ class GRC final : public ServiceFramework { public: explicit GRC() : ServiceFramework{"grc:c"} { // clang-format off - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {1, nullptr, "OpenContinuousRecorder"}, {2, nullptr, "OpenGameMovieTrimmer"}, }; diff --git a/src/core/hle/service/hid/hid.cpp b/src/core/hle/service/hid/hid.cpp index 2ec38c726a..bcc81369e1 100644 --- a/src/core/hle/service/hid/hid.cpp +++ b/src/core/hle/service/hid/hid.cpp @@ -59,7 +59,7 @@ enum class HidController : std::size_t { class IAppletResource final : public ServiceFramework { public: IAppletResource() : ServiceFramework("IAppletResource") { - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, &IAppletResource::GetSharedMemoryHandle, "GetSharedMemoryHandle"}, }; RegisterHandlers(functions); @@ -157,7 +157,7 @@ private: class IActiveVibrationDeviceList final : public ServiceFramework { public: IActiveVibrationDeviceList() : ServiceFramework("IActiveVibrationDeviceList") { - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, &IActiveVibrationDeviceList::ActivateVibrationDevice, "ActivateVibrationDevice"}, }; RegisterHandlers(functions); @@ -176,7 +176,7 @@ class Hid final : public ServiceFramework { public: Hid() : ServiceFramework("hid") { // clang-format off - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, &Hid::CreateAppletResource, "CreateAppletResource"}, {1, &Hid::ActivateDebugPad, "ActivateDebugPad"}, {11, &Hid::ActivateTouchScreen, "ActivateTouchScreen"}, @@ -651,7 +651,7 @@ class HidDbg final : public ServiceFramework { public: explicit HidDbg() : ServiceFramework{"hid:dbg"} { // clang-format off - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, nullptr, "DeactivateDebugPad"}, {1, nullptr, "SetDebugPadAutoPilotState"}, {2, nullptr, "UnsetDebugPadAutoPilotState"}, @@ -734,7 +734,7 @@ class HidSys final : public ServiceFramework { public: explicit HidSys() : ServiceFramework{"hid:sys"} { // clang-format off - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {31, nullptr, "SendKeyboardLockKeyEvent"}, {101, nullptr, "AcquireHomeButtonEventHandle"}, {111, nullptr, "ActivateHomeButton"}, @@ -851,7 +851,7 @@ class HidTmp final : public ServiceFramework { public: explicit HidTmp() : ServiceFramework{"hid:tmp"} { // clang-format off - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, nullptr, "GetConsoleSixAxisSensorCalibrationValues"}, }; // clang-format on @@ -864,7 +864,7 @@ class HidBus final : public ServiceFramework { public: explicit HidBus() : ServiceFramework{"hidbus"} { // clang-format off - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {1, nullptr, "GetBusHandle"}, {2, nullptr, "IsExternalDeviceConnected"}, {3, nullptr, "Initialize"}, diff --git a/src/core/hle/service/hid/irs.cpp b/src/core/hle/service/hid/irs.cpp index 3c7f8b1eed..22a8d4873a 100644 --- a/src/core/hle/service/hid/irs.cpp +++ b/src/core/hle/service/hid/irs.cpp @@ -13,7 +13,7 @@ namespace Service::HID { IRS::IRS() : ServiceFramework{"irs"} { // clang-format off - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {302, &IRS::ActivateIrsensor, "ActivateIrsensor"}, {303, &IRS::DeactivateIrsensor, "DeactivateIrsensor"}, {304, &IRS::GetIrsensorSharedMemoryHandle, "GetIrsensorSharedMemoryHandle"}, @@ -177,7 +177,7 @@ IRS::~IRS() = default; IRS_SYS::IRS_SYS() : ServiceFramework{"irs:sys"} { // clang-format off - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {500, nullptr, "SetAppletResourceUserId"}, {501, nullptr, "RegisterAppletResourceUserId"}, {502, nullptr, "UnregisterAppletResourceUserId"}, diff --git a/src/core/hle/service/hid/xcd.cpp b/src/core/hle/service/hid/xcd.cpp index c8e9125f60..61a42b6546 100644 --- a/src/core/hle/service/hid/xcd.cpp +++ b/src/core/hle/service/hid/xcd.cpp @@ -8,7 +8,7 @@ namespace Service::HID { XCD_SYS::XCD_SYS() : ServiceFramework{"xcd:sys"} { // clang-format off - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, nullptr, "GetDataFormat"}, {1, nullptr, "SetDataFormat"}, {2, nullptr, "GetMcuState"}, diff --git a/src/core/hle/service/lbl/lbl.cpp b/src/core/hle/service/lbl/lbl.cpp index e8f9f2d29a..7558aa08cc 100644 --- a/src/core/hle/service/lbl/lbl.cpp +++ b/src/core/hle/service/lbl/lbl.cpp @@ -17,7 +17,7 @@ class LBL final : public ServiceFramework { public: explicit LBL() : ServiceFramework{"lbl"} { // clang-format off - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, nullptr, "SaveCurrentSetting"}, {1, nullptr, "LoadCurrentSetting"}, {2, nullptr, "SetCurrentBrightnessSetting"}, diff --git a/src/core/hle/service/ldn/ldn.cpp b/src/core/hle/service/ldn/ldn.cpp index e250595e3c..bc834892c1 100644 --- a/src/core/hle/service/ldn/ldn.cpp +++ b/src/core/hle/service/ldn/ldn.cpp @@ -15,7 +15,7 @@ class IMonitorService final : public ServiceFramework { public: explicit IMonitorService() : ServiceFramework{"IMonitorService"} { // clang-format off - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, nullptr, "GetStateForMonitor"}, {1, nullptr, "GetNetworkInfoForMonitor"}, {2, nullptr, "GetIpv4AddressForMonitor"}, @@ -35,7 +35,7 @@ class LDNM final : public ServiceFramework { public: explicit LDNM() : ServiceFramework{"ldn:m"} { // clang-format off - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, &LDNM::CreateMonitorService, "CreateMonitorService"} }; // clang-format on @@ -56,7 +56,7 @@ class ILocalCommunicationService final : public ServiceFramework { public: explicit LDNS() : ServiceFramework{"ldn:s"} { // clang-format off - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, &LDNS::CreateSystemLocalCommunicationService, "CreateSystemLocalCommunicationService"}, }; // clang-format on @@ -116,7 +116,7 @@ class LDNU final : public ServiceFramework { public: explicit LDNU() : ServiceFramework{"ldn:u"} { // clang-format off - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, &LDNU::CreateUserLocalCommunicationService, "CreateUserLocalCommunicationService"}, }; // clang-format on diff --git a/src/core/hle/service/ldr/ldr.cpp b/src/core/hle/service/ldr/ldr.cpp index 13bcefe078..7401b0ec27 100644 --- a/src/core/hle/service/ldr/ldr.cpp +++ b/src/core/hle/service/ldr/ldr.cpp @@ -35,7 +35,7 @@ class DebugMonitor final : public ServiceFramework { public: explicit DebugMonitor() : ServiceFramework{"ldr:dmnt"} { // clang-format off - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, nullptr, "AddProcessToDebugLaunchQueue"}, {1, nullptr, "ClearDebugLaunchQueue"}, {2, nullptr, "GetNsoInfos"}, @@ -50,7 +50,7 @@ class ProcessManager final : public ServiceFramework { public: explicit ProcessManager() : ServiceFramework{"ldr:pm"} { // clang-format off - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, nullptr, "CreateProcess"}, {1, nullptr, "GetProgramInfo"}, {2, nullptr, "RegisterTitle"}, @@ -66,7 +66,7 @@ class Shell final : public ServiceFramework { public: explicit Shell() : ServiceFramework{"ldr:shel"} { // clang-format off - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, nullptr, "AddProcessToLaunchQueue"}, {1, nullptr, "ClearLaunchQueue"}, }; @@ -80,7 +80,7 @@ class RelocatableObject final : public ServiceFramework { public: explicit RelocatableObject() : ServiceFramework{"ldr:ro"} { // clang-format off - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, &RelocatableObject::LoadNro, "LoadNro"}, {1, &RelocatableObject::UnloadNro, "UnloadNro"}, {2, &RelocatableObject::LoadNrr, "LoadNrr"}, diff --git a/src/core/hle/service/lm/lm.cpp b/src/core/hle/service/lm/lm.cpp index 1f462e087a..bf798f8690 100644 --- a/src/core/hle/service/lm/lm.cpp +++ b/src/core/hle/service/lm/lm.cpp @@ -16,7 +16,7 @@ namespace Service::LM { class ILogger final : public ServiceFramework { public: ILogger() : ServiceFramework("ILogger") { - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0x00000000, &ILogger::Initialize, "Initialize"}, {0x00000001, &ILogger::SetDestination, "SetDestination"}, }; @@ -195,7 +195,7 @@ private: class LM final : public ServiceFramework { public: explicit LM() : ServiceFramework{"lm"} { - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0x00000000, &LM::OpenLogger, "OpenLogger"}, }; RegisterHandlers(functions); diff --git a/src/core/hle/service/mig/mig.cpp b/src/core/hle/service/mig/mig.cpp index d16367f2cf..27a914588b 100644 --- a/src/core/hle/service/mig/mig.cpp +++ b/src/core/hle/service/mig/mig.cpp @@ -14,7 +14,7 @@ class MIG_USR final : public ServiceFramework { public: explicit MIG_USR() : ServiceFramework{"mig:usr"} { // clang-format off - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {10, nullptr, "TryGetLastMigrationInfo"}, {100, nullptr, "CreateServer"}, {101, nullptr, "ResumeServer"}, diff --git a/src/core/hle/service/mii/mii.cpp b/src/core/hle/service/mii/mii.cpp index a6197124a4..79d60c7815 100644 --- a/src/core/hle/service/mii/mii.cpp +++ b/src/core/hle/service/mii/mii.cpp @@ -17,7 +17,7 @@ class IDatabaseService final : public ServiceFramework { public: explicit IDatabaseService() : ServiceFramework{"IDatabaseService"} { // clang-format off - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, nullptr, "IsUpdated"}, {1, nullptr, "IsFullDatabase"}, {2, nullptr, "GetCount"}, @@ -53,7 +53,7 @@ class MiiDBModule final : public ServiceFramework { public: explicit MiiDBModule(const char* name) : ServiceFramework{name} { // clang-format off - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, &MiiDBModule::GetDatabaseService, "GetDatabaseService"}, }; // clang-format on @@ -75,7 +75,7 @@ class MiiImg final : public ServiceFramework { public: explicit MiiImg() : ServiceFramework{"miiimg"} { // clang-format off - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, nullptr, "Initialize"}, {10, nullptr, "Reload"}, {11, nullptr, "GetCount"}, diff --git a/src/core/hle/service/mm/mm_u.cpp b/src/core/hle/service/mm/mm_u.cpp index def63dc8ad..68fe675c01 100644 --- a/src/core/hle/service/mm/mm_u.cpp +++ b/src/core/hle/service/mm/mm_u.cpp @@ -13,7 +13,7 @@ class MM_U final : public ServiceFramework { public: explicit MM_U() : ServiceFramework{"mm:u"} { // clang-format off - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, &MM_U::Initialize, "Initialize"}, {1, &MM_U::Finalize, "Finalize"}, {2, &MM_U::SetAndWait, "SetAndWait"}, diff --git a/src/core/hle/service/ncm/ncm.cpp b/src/core/hle/service/ncm/ncm.cpp index 0297edca01..e41753ce8d 100644 --- a/src/core/hle/service/ncm/ncm.cpp +++ b/src/core/hle/service/ncm/ncm.cpp @@ -14,7 +14,7 @@ class LocationResolver final : public ServiceFramework { public: explicit LocationResolver() : ServiceFramework{"lr"} { // clang-format off - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, nullptr, "OpenLocationResolver"}, {1, nullptr, "OpenRegisteredLocationResolver"}, {2, nullptr, "RefreshLocationResolver"}, @@ -30,7 +30,7 @@ class NCM final : public ServiceFramework { public: explicit NCM() : ServiceFramework{"ncm"} { // clang-format off - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, nullptr, "CreateContentStorage"}, {1, nullptr, "CreateContentMetaDatabase"}, {2, nullptr, "VerifyContentStorage"}, diff --git a/src/core/hle/service/nfc/nfc.cpp b/src/core/hle/service/nfc/nfc.cpp index 5c62d42ba3..528670accd 100644 --- a/src/core/hle/service/nfc/nfc.cpp +++ b/src/core/hle/service/nfc/nfc.cpp @@ -18,7 +18,7 @@ class IAm final : public ServiceFramework { public: explicit IAm() : ServiceFramework{"NFC::IAm"} { // clang-format off - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, nullptr, "Initialize"}, {1, nullptr, "Finalize"}, {2, nullptr, "NotifyForegroundApplet"}, @@ -33,7 +33,7 @@ class NFC_AM final : public ServiceFramework { public: explicit NFC_AM() : ServiceFramework{"nfc:am"} { // clang-format off - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, &NFC_AM::CreateAmInterface, "CreateAmInterface"}, }; // clang-format on @@ -55,7 +55,7 @@ class MFIUser final : public ServiceFramework { public: explicit MFIUser() : ServiceFramework{"NFC::MFIUser"} { // clang-format off - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, nullptr, "Initialize"}, {1, nullptr, "Finalize"}, {2, nullptr, "ListDevices"}, @@ -81,7 +81,7 @@ class NFC_MF_U final : public ServiceFramework { public: explicit NFC_MF_U() : ServiceFramework{"nfc:mf:u"} { // clang-format off - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, &NFC_MF_U::CreateUserInterface, "CreateUserInterface"}, }; // clang-format on @@ -103,7 +103,7 @@ class IUser final : public ServiceFramework { public: explicit IUser() : ServiceFramework{"NFC::IUser"} { // clang-format off - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, &IUser::InitializeOld, "InitializeOld"}, {1, &IUser::FinalizeOld, "FinalizeOld"}, {2, &IUser::GetStateOld, "GetStateOld"}, @@ -173,7 +173,7 @@ class NFC_U final : public ServiceFramework { public: explicit NFC_U() : ServiceFramework{"nfc:user"} { // clang-format off - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, &NFC_U::CreateUserInterface, "CreateUserInterface"}, }; // clang-format on @@ -195,7 +195,7 @@ class ISystem final : public ServiceFramework { public: explicit ISystem() : ServiceFramework{"ISystem"} { // clang-format off - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, nullptr, "Initialize"}, {1, nullptr, "Finalize"}, {2, nullptr, "GetState"}, @@ -231,7 +231,7 @@ class NFC_SYS final : public ServiceFramework { public: explicit NFC_SYS() : ServiceFramework{"nfc:sys"} { // clang-format off - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, &NFC_SYS::CreateSystemInterface, "CreateSystemInterface"}, }; // clang-format on diff --git a/src/core/hle/service/nfp/nfp.cpp b/src/core/hle/service/nfp/nfp.cpp index d5df112a06..23ef97e965 100644 --- a/src/core/hle/service/nfp/nfp.cpp +++ b/src/core/hle/service/nfp/nfp.cpp @@ -35,7 +35,7 @@ class IUser final : public ServiceFramework { public: IUser(Module::Interface& nfp_interface) : ServiceFramework("NFP::IUser"), nfp_interface(nfp_interface) { - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, &IUser::Initialize, "Initialize"}, {1, &IUser::Finalize, "Finalize"}, {2, &IUser::ListDevices, "ListDevices"}, diff --git a/src/core/hle/service/nfp/nfp_user.cpp b/src/core/hle/service/nfp/nfp_user.cpp index 784a87c1b5..7f3e3587f4 100644 --- a/src/core/hle/service/nfp/nfp_user.cpp +++ b/src/core/hle/service/nfp/nfp_user.cpp @@ -8,7 +8,7 @@ namespace Service::NFP { NFP_User::NFP_User(std::shared_ptr module) : Module::Interface(std::move(module), "nfp:user") { - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, &NFP_User::CreateUserInterface, "CreateUserInterface"}, }; RegisterHandlers(functions); diff --git a/src/core/hle/service/nifm/nifm.cpp b/src/core/hle/service/nifm/nifm.cpp index 60479bb456..96028ec5d7 100644 --- a/src/core/hle/service/nifm/nifm.cpp +++ b/src/core/hle/service/nifm/nifm.cpp @@ -15,7 +15,7 @@ namespace Service::NIFM { class IScanRequest final : public ServiceFramework { public: explicit IScanRequest() : ServiceFramework("IScanRequest") { - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, nullptr, "Submit"}, {1, nullptr, "IsProcessing"}, {2, nullptr, "GetResult"}, @@ -28,7 +28,7 @@ public: class IRequest final : public ServiceFramework { public: explicit IRequest() : ServiceFramework("IRequest") { - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, &IRequest::GetRequestState, "GetRequestState"}, {1, &IRequest::GetResult, "GetResult"}, {2, &IRequest::GetSystemEventReadableHandles, "GetSystemEventReadableHandles"}, @@ -115,7 +115,7 @@ private: class INetworkProfile final : public ServiceFramework { public: explicit INetworkProfile() : ServiceFramework("INetworkProfile") { - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, nullptr, "Update"}, {1, nullptr, "PersistOld"}, {2, nullptr, "Persist"}, @@ -197,7 +197,7 @@ private: }; IGeneralService::IGeneralService() : ServiceFramework("IGeneralService") { - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {1, &IGeneralService::GetClientId, "GetClientId"}, {2, &IGeneralService::CreateScanRequest, "CreateScanRequest"}, {4, &IGeneralService::CreateRequest, "CreateRequest"}, @@ -242,7 +242,7 @@ IGeneralService::IGeneralService() : ServiceFramework("IGeneralService") { class NetworkInterface final : public ServiceFramework { public: explicit NetworkInterface(const char* name) : ServiceFramework{name} { - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {4, &NetworkInterface::CreateGeneralServiceOld, "CreateGeneralServiceOld"}, {5, &NetworkInterface::CreateGeneralService, "CreateGeneralService"}, }; diff --git a/src/core/hle/service/nim/nim.cpp b/src/core/hle/service/nim/nim.cpp index 0dabcd23b6..936da6a2f4 100644 --- a/src/core/hle/service/nim/nim.cpp +++ b/src/core/hle/service/nim/nim.cpp @@ -19,7 +19,7 @@ class NIM final : public ServiceFramework { public: explicit NIM() : ServiceFramework{"nim"} { // clang-format off - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, nullptr, "CreateSystemUpdateTask"}, {1, nullptr, "DestroySystemUpdateTask"}, {2, nullptr, "ListSystemUpdateTask"}, @@ -77,7 +77,7 @@ class NIM_ECA final : public ServiceFramework { public: explicit NIM_ECA() : ServiceFramework{"nim:eca"} { // clang-format off - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, nullptr, "CreateServerInterface"}, {1, nullptr, "RefreshDebugAvailability"}, {2, nullptr, "ClearDebugResponse"}, @@ -93,7 +93,7 @@ class NIM_SHP final : public ServiceFramework { public: explicit NIM_SHP() : ServiceFramework{"nim:shp"} { // clang-format off - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, nullptr, "RequestDeviceAuthenticationToken"}, {1, nullptr, "RequestCachedDeviceAuthenticationToken"}, {100, nullptr, "RequestRegisterDeviceAccount"}, @@ -128,7 +128,7 @@ class IEnsureNetworkClockAvailabilityService final public: IEnsureNetworkClockAvailabilityService() : ServiceFramework("IEnsureNetworkClockAvailabilityService") { - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, &IEnsureNetworkClockAvailabilityService::StartTask, "StartTask"}, {1, &IEnsureNetworkClockAvailabilityService::GetFinishNotificationEvent, "GetFinishNotificationEvent"}, @@ -202,7 +202,7 @@ class NTC final : public ServiceFramework { public: explicit NTC() : ServiceFramework{"ntc"} { // clang-format off - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, &NTC::OpenEnsureNetworkClockAvailabilityService, "OpenEnsureNetworkClockAvailabilityService"}, {100, &NTC::SuspendAutonomicTimeCorrection, "SuspendAutonomicTimeCorrection"}, {101, &NTC::ResumeAutonomicTimeCorrection, "ResumeAutonomicTimeCorrection"}, diff --git a/src/core/hle/service/npns/npns.cpp b/src/core/hle/service/npns/npns.cpp index ccb6f9da94..b6b8f8992a 100644 --- a/src/core/hle/service/npns/npns.cpp +++ b/src/core/hle/service/npns/npns.cpp @@ -14,7 +14,7 @@ class NPNS_S final : public ServiceFramework { public: explicit NPNS_S() : ServiceFramework{"npns:s"} { // clang-format off - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {1, nullptr, "ListenAll"}, {2, nullptr, "ListenTo"}, {3, nullptr, "Receive"}, @@ -57,7 +57,7 @@ class NPNS_U final : public ServiceFramework { public: explicit NPNS_U() : ServiceFramework{"npns:u"} { // clang-format off - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {1, nullptr, "ListenAll"}, {2, nullptr, "ListenTo"}, {3, nullptr, "Receive"}, diff --git a/src/core/hle/service/ns/ns.cpp b/src/core/hle/service/ns/ns.cpp index 2663f56b19..65061b94b5 100644 --- a/src/core/hle/service/ns/ns.cpp +++ b/src/core/hle/service/ns/ns.cpp @@ -16,7 +16,7 @@ class IAccountProxyInterface final : public ServiceFramework { public: explicit IDocumentInterface() : ServiceFramework{"IDocumentInterface"} { // clang-format off - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {21, nullptr, "GetApplicationContentPath"}, {23, nullptr, "ResolveApplicationContentPath"}, }; @@ -366,7 +366,7 @@ class IDownloadTaskInterface final : public ServiceFramework { public: explicit IECommerceInterface() : ServiceFramework{"IECommerceInterface"} { // clang-format off - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, nullptr, "RequestLinkDevice"}, }; // clang-format on @@ -400,7 +400,7 @@ class IFactoryResetInterface final : public ServiceFramework { public: explicit NS(const char* name) : ServiceFramework{name} { // clang-format off - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {7992, &NS::PushInterface, "GetECommerceInterface"}, {7993, &NS::PushInterface, "GetApplicationVersionInterface"}, {7994, &NS::PushInterface, "GetFactoryResetInterface"}, @@ -445,7 +445,7 @@ class NS_DEV final : public ServiceFramework { public: explicit NS_DEV() : ServiceFramework{"ns:dev"} { // clang-format off - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, nullptr, "LaunchProgram"}, {1, nullptr, "TerminateProcess"}, {2, nullptr, "TerminateProgram"}, @@ -469,7 +469,7 @@ class ISystemUpdateControl final : public ServiceFramework public: explicit ISystemUpdateControl() : ServiceFramework{"ISystemUpdateControl"} { // clang-format off - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, nullptr, "HasDownloaded"}, {1, nullptr, "RequestCheckLatestUpdate"}, {2, nullptr, "RequestDownloadLatestUpdate"}, @@ -504,7 +504,7 @@ class NS_SU final : public ServiceFramework { public: explicit NS_SU() : ServiceFramework{"ns:su"} { // clang-format off - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, nullptr, "GetBackgroundNetworkUpdateState"}, {1, &NS_SU::OpenSystemUpdateControl, "OpenSystemUpdateControl"}, {2, nullptr, "NotifyExFatDriverRequired"}, @@ -538,7 +538,7 @@ class NS_VM final : public ServiceFramework { public: explicit NS_VM() : ServiceFramework{"ns:vm"} { // clang-format off - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {1200, nullptr, "NeedsUpdateVulnerability"}, {1201, nullptr, "UpdateSafeSystemVersionForDebug"}, {1202, nullptr, "GetSafeSystemVersion"}, diff --git a/src/core/hle/service/ns/pl_u.cpp b/src/core/hle/service/ns/pl_u.cpp index ad176f89df..ead755b3bb 100644 --- a/src/core/hle/service/ns/pl_u.cpp +++ b/src/core/hle/service/ns/pl_u.cpp @@ -151,7 +151,7 @@ struct PL_U::Impl { }; PL_U::PL_U() : ServiceFramework("pl:u"), impl{std::make_unique()} { - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, &PL_U::RequestLoad, "RequestLoad"}, {1, &PL_U::GetLoadState, "GetLoadState"}, {2, &PL_U::GetSize, "GetSize"}, diff --git a/src/core/hle/service/nvdrv/interface.cpp b/src/core/hle/service/nvdrv/interface.cpp index 3b9ab4b147..38bb512322 100644 --- a/src/core/hle/service/nvdrv/interface.cpp +++ b/src/core/hle/service/nvdrv/interface.cpp @@ -110,7 +110,7 @@ void NVDRV::DumpGraphicsMemoryInfo(Kernel::HLERequestContext& ctx) { NVDRV::NVDRV(std::shared_ptr nvdrv, const char* name) : ServiceFramework(name), nvdrv(std::move(nvdrv)) { - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, &NVDRV::Open, "Open"}, {1, &NVDRV::Ioctl, "Ioctl"}, {2, &NVDRV::Close, "Close"}, diff --git a/src/core/hle/service/nvdrv/nvmemp.cpp b/src/core/hle/service/nvdrv/nvmemp.cpp index b7b8b7a1b6..df8c17433b 100644 --- a/src/core/hle/service/nvdrv/nvmemp.cpp +++ b/src/core/hle/service/nvdrv/nvmemp.cpp @@ -9,7 +9,7 @@ namespace Service::Nvidia { NVMEMP::NVMEMP() : ServiceFramework("nvmemp") { - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, &NVMEMP::Cmd0, "Cmd0"}, {1, &NVMEMP::Cmd1, "Cmd1"}, }; diff --git a/src/core/hle/service/pcie/pcie.cpp b/src/core/hle/service/pcie/pcie.cpp index 39cf05eba2..7885aefd1b 100644 --- a/src/core/hle/service/pcie/pcie.cpp +++ b/src/core/hle/service/pcie/pcie.cpp @@ -14,7 +14,7 @@ class ISession final : public ServiceFramework { public: explicit ISession() : ServiceFramework{"ISession"} { // clang-format off - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, nullptr, "QueryFunctions"}, {1, nullptr, "AcquireFunction"}, {2, nullptr, "ReleaseFunction"}, @@ -47,7 +47,7 @@ class PCIe final : public ServiceFramework { public: explicit PCIe() : ServiceFramework{"pcie"} { // clang-format off - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, nullptr, "RegisterClassDriver"}, {1, nullptr, "QueryFunctionsUnregistered"}, }; diff --git a/src/core/hle/service/pctl/module.cpp b/src/core/hle/service/pctl/module.cpp index 6081f41e13..fae0d795c3 100644 --- a/src/core/hle/service/pctl/module.cpp +++ b/src/core/hle/service/pctl/module.cpp @@ -12,7 +12,7 @@ namespace Service::PCTL { class IParentalControlService final : public ServiceFramework { public: IParentalControlService() : ServiceFramework("IParentalControlService") { - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {1, &IParentalControlService::Initialize, "Initialize"}, {1001, &IParentalControlService::CheckFreeCommunicationPermission, "CheckFreeCommunicationPermission"}, diff --git a/src/core/hle/service/pctl/pctl.cpp b/src/core/hle/service/pctl/pctl.cpp index af9d1433a5..a3fa0a4503 100644 --- a/src/core/hle/service/pctl/pctl.cpp +++ b/src/core/hle/service/pctl/pctl.cpp @@ -8,7 +8,7 @@ namespace Service::PCTL { PCTL::PCTL(std::shared_ptr module, const char* name) : Module::Interface(std::move(module), name) { - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, &PCTL::CreateService, "CreateService"}, {1, &PCTL::CreateServiceWithoutInitialize, "CreateServiceWithoutInitialize"}, }; diff --git a/src/core/hle/service/pcv/pcv.cpp b/src/core/hle/service/pcv/pcv.cpp index d6891a6593..b2b7c8eb47 100644 --- a/src/core/hle/service/pcv/pcv.cpp +++ b/src/core/hle/service/pcv/pcv.cpp @@ -14,7 +14,7 @@ class PCV final : public ServiceFramework { public: explicit PCV() : ServiceFramework{"pcv"} { // clang-format off - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, nullptr, "SetPowerEnabled"}, {1, nullptr, "SetClockEnabled"}, {2, nullptr, "SetClockRate"}, @@ -53,7 +53,7 @@ class PCV_ARB final : public ServiceFramework { public: explicit PCV_ARB() : ServiceFramework{"pcv:arb"} { // clang-format off - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, nullptr, "ReleaseControl"}, }; // clang-format on @@ -66,7 +66,7 @@ class PCV_IMM final : public ServiceFramework { public: explicit PCV_IMM() : ServiceFramework{"pcv:imm"} { // clang-format off - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, nullptr, "SetClockRate"}, }; // clang-format on diff --git a/src/core/hle/service/pm/pm.cpp b/src/core/hle/service/pm/pm.cpp index 53e7da9c3a..607ae134a0 100644 --- a/src/core/hle/service/pm/pm.cpp +++ b/src/core/hle/service/pm/pm.cpp @@ -11,7 +11,7 @@ namespace Service::PM { class BootMode final : public ServiceFramework { public: explicit BootMode() : ServiceFramework{"pm:bm"} { - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, &BootMode::GetBootMode, "GetBootMode"}, {1, nullptr, "SetMaintenanceBoot"}, }; @@ -31,7 +31,7 @@ private: class DebugMonitor final : public ServiceFramework { public: explicit DebugMonitor() : ServiceFramework{"pm:dmnt"} { - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, nullptr, "IsDebugMode"}, {1, nullptr, "GetDebugProcesses"}, {2, nullptr, "StartDebugProcess"}, @@ -47,7 +47,7 @@ public: class Info final : public ServiceFramework { public: explicit Info() : ServiceFramework{"pm:info"} { - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, nullptr, "GetTitleId"}, }; RegisterHandlers(functions); @@ -57,7 +57,7 @@ public: class Shell final : public ServiceFramework { public: explicit Shell() : ServiceFramework{"pm:shell"} { - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, nullptr, "LaunchProcess"}, {1, nullptr, "TerminateProcessByPid"}, {2, nullptr, "TerminateProcessByTitleId"}, diff --git a/src/core/hle/service/prepo/prepo.cpp b/src/core/hle/service/prepo/prepo.cpp index e4fcee9f8a..f4e7f32cf7 100644 --- a/src/core/hle/service/prepo/prepo.cpp +++ b/src/core/hle/service/prepo/prepo.cpp @@ -13,7 +13,7 @@ class PlayReport final : public ServiceFramework { public: explicit PlayReport(const char* name) : ServiceFramework{name} { // clang-format off - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {10100, nullptr, "SaveReportOld"}, {10101, &PlayReport::SaveReportWithUserOld, "SaveReportWithUserOld"}, {10102, nullptr, "SaveReport"}, diff --git a/src/core/hle/service/psc/psc.cpp b/src/core/hle/service/psc/psc.cpp index 0ba0a40763..49bd0b9704 100644 --- a/src/core/hle/service/psc/psc.cpp +++ b/src/core/hle/service/psc/psc.cpp @@ -16,7 +16,7 @@ class PSC_C final : public ServiceFramework { public: explicit PSC_C() : ServiceFramework{"psc:c"} { // clang-format off - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, nullptr, "Unknown1"}, {1, nullptr, "Unknown2"}, {2, nullptr, "Unknown3"}, @@ -35,7 +35,7 @@ class IPmModule final : public ServiceFramework { public: explicit IPmModule() : ServiceFramework{"IPmModule"} { // clang-format off - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, nullptr, "Initialize"}, {1, nullptr, "GetRequest"}, {2, nullptr, "Acknowledge"}, @@ -51,7 +51,7 @@ class PSC_M final : public ServiceFramework { public: explicit PSC_M() : ServiceFramework{"psc:m"} { // clang-format off - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, &PSC_M::GetPmModule, "GetPmModule"}, }; // clang-format on diff --git a/src/core/hle/service/ptm/psm.cpp b/src/core/hle/service/ptm/psm.cpp index c2d5fda94d..07e3cf6d7d 100644 --- a/src/core/hle/service/ptm/psm.cpp +++ b/src/core/hle/service/ptm/psm.cpp @@ -19,7 +19,7 @@ class PSM final : public ServiceFramework { public: explicit PSM() : ServiceFramework{"psm"} { // clang-format off - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, &PSM::GetBatteryChargePercentage, "GetBatteryChargePercentage"}, {1, &PSM::GetChargerType, "GetChargerType"}, {2, nullptr, "EnableBatteryCharging"}, diff --git a/src/core/hle/service/set/set.cpp b/src/core/hle/service/set/set.cpp index 1afc43f759..223a95b7a0 100644 --- a/src/core/hle/service/set/set.cpp +++ b/src/core/hle/service/set/set.cpp @@ -116,7 +116,7 @@ void SET::GetLanguageCode(Kernel::HLERequestContext& ctx) { } SET::SET() : ServiceFramework("set") { - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, &SET::GetLanguageCode, "GetLanguageCode"}, {1, &SET::GetAvailableLanguageCodes, "GetAvailableLanguageCodes"}, {2, &SET::MakeLanguageCode, "MakeLanguageCode"}, diff --git a/src/core/hle/service/set/set_cal.cpp b/src/core/hle/service/set/set_cal.cpp index 34654bb07b..d11fb6b99d 100644 --- a/src/core/hle/service/set/set_cal.cpp +++ b/src/core/hle/service/set/set_cal.cpp @@ -7,7 +7,7 @@ namespace Service::Set { SET_CAL::SET_CAL() : ServiceFramework("set:cal") { - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, nullptr, "GetBluetoothBdAddress"}, {1, nullptr, "GetConfigurationId1"}, {2, nullptr, "GetAccelerometerOffset"}, diff --git a/src/core/hle/service/set/set_fd.cpp b/src/core/hle/service/set/set_fd.cpp index cac6af86dc..c040062f21 100644 --- a/src/core/hle/service/set/set_fd.cpp +++ b/src/core/hle/service/set/set_fd.cpp @@ -7,7 +7,7 @@ namespace Service::Set { SET_FD::SET_FD() : ServiceFramework("set:fd") { - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {2, nullptr, "SetSettingsItemValue"}, {3, nullptr, "ResetSettingsItemValue"}, {4, nullptr, "CreateSettingsItemKeyIterator"}, diff --git a/src/core/hle/service/set/set_sys.cpp b/src/core/hle/service/set/set_sys.cpp index c9b4da5b08..8f08154a76 100644 --- a/src/core/hle/service/set/set_sys.cpp +++ b/src/core/hle/service/set/set_sys.cpp @@ -29,7 +29,7 @@ void SET_SYS::SetColorSetId(Kernel::HLERequestContext& ctx) { } SET_SYS::SET_SYS() : ServiceFramework("set:sys") { - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, nullptr, "SetLanguageCode"}, {1, nullptr, "SetNetworkSettings"}, {2, nullptr, "GetNetworkSettings"}, diff --git a/src/core/hle/service/sm/controller.cpp b/src/core/hle/service/sm/controller.cpp index 74da4d5e66..fb32527e55 100644 --- a/src/core/hle/service/sm/controller.cpp +++ b/src/core/hle/service/sm/controller.cpp @@ -51,7 +51,7 @@ void Controller::QueryPointerBufferSize(Kernel::HLERequestContext& ctx) { } Controller::Controller() : ServiceFramework("IpcController") { - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0x00000000, &Controller::ConvertSessionToDomain, "ConvertSessionToDomain"}, {0x00000001, nullptr, "ConvertDomainToSession"}, {0x00000002, &Controller::DuplicateSession, "DuplicateSession"}, diff --git a/src/core/hle/service/sm/sm.cpp b/src/core/hle/service/sm/sm.cpp index d735300860..4e6960c80e 100644 --- a/src/core/hle/service/sm/sm.cpp +++ b/src/core/hle/service/sm/sm.cpp @@ -179,7 +179,7 @@ void SM::UnregisterService(Kernel::HLERequestContext& ctx) { SM::SM(std::shared_ptr service_manager) : ServiceFramework("sm:", 4), service_manager(std::move(service_manager)) { - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0x00000000, &SM::Initialize, "Initialize"}, {0x00000001, &SM::GetService, "GetService"}, {0x00000002, &SM::RegisterService, "RegisterService"}, diff --git a/src/core/hle/service/sockets/bsd.cpp b/src/core/hle/service/sockets/bsd.cpp index 4342f3b2de..1400b159ab 100644 --- a/src/core/hle/service/sockets/bsd.cpp +++ b/src/core/hle/service/sockets/bsd.cpp @@ -73,7 +73,7 @@ void BSD::Close(Kernel::HLERequestContext& ctx) { } BSD::BSD(const char* name) : ServiceFramework(name) { - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, &BSD::RegisterClient, "RegisterClient"}, {1, &BSD::StartMonitoring, "StartMonitoring"}, {2, &BSD::Socket, "Socket"}, @@ -113,7 +113,7 @@ BSD::~BSD() = default; BSDCFG::BSDCFG() : ServiceFramework{"bsdcfg"} { // clang-format off - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, nullptr, "SetIfUp"}, {1, nullptr, "SetIfUpWithEvent"}, {2, nullptr, "CancelIf"}, diff --git a/src/core/hle/service/sockets/ethc.cpp b/src/core/hle/service/sockets/ethc.cpp index abbeb4c50b..81d8dca6d0 100644 --- a/src/core/hle/service/sockets/ethc.cpp +++ b/src/core/hle/service/sockets/ethc.cpp @@ -8,7 +8,7 @@ namespace Service::Sockets { ETHC_C::ETHC_C() : ServiceFramework{"ethc:c"} { // clang-format off - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, nullptr, "Initialize"}, {1, nullptr, "Cancel"}, {2, nullptr, "GetResult"}, @@ -25,7 +25,7 @@ ETHC_C::~ETHC_C() = default; ETHC_I::ETHC_I() : ServiceFramework{"ethc:i"} { // clang-format off - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, nullptr, "GetReadableHandle"}, {1, nullptr, "Cancel"}, {2, nullptr, "GetResult"}, diff --git a/src/core/hle/service/sockets/nsd.cpp b/src/core/hle/service/sockets/nsd.cpp index e6d73065e4..05c9d27122 100644 --- a/src/core/hle/service/sockets/nsd.cpp +++ b/src/core/hle/service/sockets/nsd.cpp @@ -7,7 +7,7 @@ namespace Service::Sockets { NSD::NSD(const char* name) : ServiceFramework(name) { - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {10, nullptr, "GetSettingName"}, {11, nullptr, "GetEnvironmentIdentifier"}, {12, nullptr, "GetDeviceId"}, diff --git a/src/core/hle/service/sockets/sfdnsres.cpp b/src/core/hle/service/sockets/sfdnsres.cpp index 13ab1d31ef..70d0c2fa7f 100644 --- a/src/core/hle/service/sockets/sfdnsres.cpp +++ b/src/core/hle/service/sockets/sfdnsres.cpp @@ -18,7 +18,7 @@ void SFDNSRES::GetAddrInfo(Kernel::HLERequestContext& ctx) { } SFDNSRES::SFDNSRES() : ServiceFramework("sfdnsres") { - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, nullptr, "SetDnsAddressesPrivate"}, {1, nullptr, "GetDnsAddressPrivate"}, {2, nullptr, "GetHostByName"}, diff --git a/src/core/hle/service/spl/csrng.cpp b/src/core/hle/service/spl/csrng.cpp index 6749287986..089022fdc8 100644 --- a/src/core/hle/service/spl/csrng.cpp +++ b/src/core/hle/service/spl/csrng.cpp @@ -7,7 +7,7 @@ namespace Service::SPL { CSRNG::CSRNG(std::shared_ptr module) : Module::Interface(std::move(module), "csrng") { - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, &CSRNG::GetRandomBytes, "GetRandomBytes"}, }; RegisterHandlers(functions); diff --git a/src/core/hle/service/spl/spl.cpp b/src/core/hle/service/spl/spl.cpp index 70cb41905d..27900b621a 100644 --- a/src/core/hle/service/spl/spl.cpp +++ b/src/core/hle/service/spl/spl.cpp @@ -7,7 +7,7 @@ namespace Service::SPL { SPL::SPL(std::shared_ptr module) : Module::Interface(std::move(module), "spl:") { - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, nullptr, "GetConfig"}, {1, nullptr, "UserExpMod"}, {2, nullptr, "GenerateAesKek"}, diff --git a/src/core/hle/service/ssl/ssl.cpp b/src/core/hle/service/ssl/ssl.cpp index af40a18157..04d59f9d54 100644 --- a/src/core/hle/service/ssl/ssl.cpp +++ b/src/core/hle/service/ssl/ssl.cpp @@ -13,7 +13,7 @@ namespace Service::SSL { class ISslConnection final : public ServiceFramework { public: ISslConnection() : ServiceFramework("ISslConnection") { - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, nullptr, "SetSocketDescriptor"}, {1, nullptr, "SetHostName"}, {2, nullptr, "SetVerifyOption"}, @@ -48,7 +48,7 @@ public: class ISslContext final : public ServiceFramework { public: ISslContext() : ServiceFramework("ISslContext") { - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, &ISslContext::SetOption, "SetOption"}, {1, nullptr, "GetOption"}, {2, &ISslContext::CreateConnection, "CreateConnection"}, @@ -89,7 +89,7 @@ class SSL final : public ServiceFramework { public: explicit SSL() : ServiceFramework{"ssl"} { // clang-format off - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, &SSL::CreateContext, "CreateContext"}, {1, nullptr, "GetContextCount"}, {2, nullptr, "GetCertificates"}, diff --git a/src/core/hle/service/time/interface.cpp b/src/core/hle/service/time/interface.cpp index b3a196f654..855d20f919 100644 --- a/src/core/hle/service/time/interface.cpp +++ b/src/core/hle/service/time/interface.cpp @@ -8,7 +8,7 @@ namespace Service::Time { Time::Time(std::shared_ptr time, const char* name) : Module::Interface(std::move(time), name) { - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, &Time::GetStandardUserSystemClock, "GetStandardUserSystemClock"}, {1, &Time::GetStandardNetworkSystemClock, "GetStandardNetworkSystemClock"}, {2, &Time::GetStandardSteadyClock, "GetStandardSteadyClock"}, diff --git a/src/core/hle/service/time/time.cpp b/src/core/hle/service/time/time.cpp index 60b201d06a..ac5ca87880 100644 --- a/src/core/hle/service/time/time.cpp +++ b/src/core/hle/service/time/time.cpp @@ -56,7 +56,7 @@ static u64 CalendarToPosix(const CalendarTime& calendar_time, class ISystemClock final : public ServiceFramework { public: ISystemClock() : ServiceFramework("ISystemClock") { - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, &ISystemClock::GetCurrentTime, "GetCurrentTime"}, {1, nullptr, "SetCurrentTime"}, {2, &ISystemClock::GetSystemClockContext, "GetSystemClockContext"}, @@ -91,7 +91,7 @@ private: class ISteadyClock final : public ServiceFramework { public: ISteadyClock() : ServiceFramework("ISteadyClock") { - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, &ISteadyClock::GetCurrentTimePoint, "GetCurrentTimePoint"}, }; RegisterHandlers(functions); @@ -112,7 +112,7 @@ private: class ITimeZoneService final : public ServiceFramework { public: ITimeZoneService() : ServiceFramework("ITimeZoneService") { - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, &ITimeZoneService::GetDeviceLocationName, "GetDeviceLocationName"}, {1, nullptr, "SetDeviceLocationName"}, {2, &ITimeZoneService::GetTotalLocationNameCount, "GetTotalLocationNameCount"}, diff --git a/src/core/hle/service/usb/usb.cpp b/src/core/hle/service/usb/usb.cpp index 58a9845fc4..ba95ffbec0 100644 --- a/src/core/hle/service/usb/usb.cpp +++ b/src/core/hle/service/usb/usb.cpp @@ -17,7 +17,7 @@ class IDsInterface final : public ServiceFramework { public: explicit IDsInterface() : ServiceFramework{"IDsInterface"} { // clang-format off - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, nullptr, "GetDsEndpoint"}, {1, nullptr, "GetSetupEvent"}, {2, nullptr, "Unknown"}, @@ -42,7 +42,7 @@ class USB_DS final : public ServiceFramework { public: explicit USB_DS() : ServiceFramework{"usb:ds"} { // clang-format off - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, nullptr, "BindDevice"}, {1, nullptr, "BindClientProcess"}, {2, nullptr, "GetDsInterface"}, @@ -66,7 +66,7 @@ class IClientEpSession final : public ServiceFramework { public: explicit IClientEpSession() : ServiceFramework{"IClientEpSession"} { // clang-format off - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, nullptr, "Open"}, {1, nullptr, "Close"}, {2, nullptr, "Unknown1"}, @@ -87,7 +87,7 @@ class IClientIfSession final : public ServiceFramework { public: explicit IClientIfSession() : ServiceFramework{"IClientIfSession"} { // clang-format off - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, nullptr, "Unknown1"}, {1, nullptr, "SetInterface"}, {2, nullptr, "GetInterface"}, @@ -109,7 +109,7 @@ class USB_HS final : public ServiceFramework { public: explicit USB_HS() : ServiceFramework{"usb:hs"} { // clang-format off - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, nullptr, "BindClientProcess"}, {1, nullptr, "QueryAllInterfaces"}, {2, nullptr, "QueryAvailableInterfaces"}, @@ -130,7 +130,7 @@ class IPdSession final : public ServiceFramework { public: explicit IPdSession() : ServiceFramework{"IPdSession"} { // clang-format off - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, nullptr, "BindNoticeEvent"}, {1, nullptr, "UnbindNoticeEvent"}, {2, nullptr, "GetStatus"}, @@ -149,7 +149,7 @@ class USB_PD final : public ServiceFramework { public: explicit USB_PD() : ServiceFramework{"usb:pd"} { // clang-format off - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, &USB_PD::GetPdSession, "GetPdSession"}, }; // clang-format on @@ -171,7 +171,7 @@ class IPdCradleSession final : public ServiceFramework { public: explicit IPdCradleSession() : ServiceFramework{"IPdCradleSession"} { // clang-format off - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, nullptr, "VdmUserWrite"}, {1, nullptr, "VdmUserRead"}, {2, nullptr, "Vdm20Init"}, @@ -192,7 +192,7 @@ class USB_PD_C final : public ServiceFramework { public: explicit USB_PD_C() : ServiceFramework{"usb:pd:c"} { // clang-format off - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, &USB_PD_C::GetPdCradleSession, "GetPdCradleSession"}, }; // clang-format on @@ -214,7 +214,7 @@ class USB_PM final : public ServiceFramework { public: explicit USB_PM() : ServiceFramework{"usb:pm"} { // clang-format off - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, nullptr, "Unknown1"}, {1, nullptr, "Unknown2"}, {2, nullptr, "Unknown3"}, diff --git a/src/core/hle/service/vi/vi.cpp b/src/core/hle/service/vi/vi.cpp index 311b0c765d..187d6aa57f 100644 --- a/src/core/hle/service/vi/vi.cpp +++ b/src/core/hle/service/vi/vi.cpp @@ -472,7 +472,7 @@ class IHOSBinderDriver final : public ServiceFramework { public: explicit IHOSBinderDriver(std::shared_ptr nv_flinger) : ServiceFramework("IHOSBinderDriver"), nv_flinger(std::move(nv_flinger)) { - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, &IHOSBinderDriver::TransactParcel, "TransactParcel"}, {1, &IHOSBinderDriver::AdjustRefcount, "AdjustRefcount"}, {2, &IHOSBinderDriver::GetNativeHandle, "GetNativeHandle"}, @@ -623,7 +623,7 @@ private: class ISystemDisplayService final : public ServiceFramework { public: explicit ISystemDisplayService() : ServiceFramework("ISystemDisplayService") { - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {1200, nullptr, "GetZOrderCountMin"}, {1202, nullptr, "GetZOrderCountMax"}, {1203, nullptr, "GetDisplayLogicalResolution"}, @@ -722,7 +722,7 @@ class IManagerDisplayService final : public ServiceFramework nv_flinger) : ServiceFramework("IManagerDisplayService"), nv_flinger(std::move(nv_flinger)) { - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {200, nullptr, "AllocateProcessHeapBlock"}, {201, nullptr, "FreeProcessHeapBlock"}, {1020, &IManagerDisplayService::CloseDisplay, "CloseDisplay"}, @@ -1074,7 +1074,7 @@ private: IApplicationDisplayService::IApplicationDisplayService( std::shared_ptr nv_flinger) : ServiceFramework("IApplicationDisplayService"), nv_flinger(std::move(nv_flinger)) { - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {100, &IApplicationDisplayService::GetRelayService, "GetRelayService"}, {101, &IApplicationDisplayService::GetSystemDisplayService, "GetSystemDisplayService"}, {102, &IApplicationDisplayService::GetManagerDisplayService, "GetManagerDisplayService"}, diff --git a/src/core/hle/service/vi/vi_m.cpp b/src/core/hle/service/vi/vi_m.cpp index 207c06b16e..c5ef17c7e9 100644 --- a/src/core/hle/service/vi/vi_m.cpp +++ b/src/core/hle/service/vi/vi_m.cpp @@ -8,7 +8,7 @@ namespace Service::VI { VI_M::VI_M(std::shared_ptr module, std::shared_ptr nv_flinger) : Module::Interface(std::move(module), "vi:m", std::move(nv_flinger)) { - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {2, &VI_M::GetDisplayService, "GetDisplayService"}, {3, nullptr, "GetDisplayServiceWithProxyNameExchange"}, }; diff --git a/src/core/hle/service/vi/vi_s.cpp b/src/core/hle/service/vi/vi_s.cpp index 920e6a1f69..1a42fe4576 100644 --- a/src/core/hle/service/vi/vi_s.cpp +++ b/src/core/hle/service/vi/vi_s.cpp @@ -8,7 +8,7 @@ namespace Service::VI { VI_S::VI_S(std::shared_ptr module, std::shared_ptr nv_flinger) : Module::Interface(std::move(module), "vi:s", std::move(nv_flinger)) { - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {1, &VI_S::GetDisplayService, "GetDisplayService"}, {3, nullptr, "GetDisplayServiceWithProxyNameExchange"}, }; diff --git a/src/core/hle/service/vi/vi_u.cpp b/src/core/hle/service/vi/vi_u.cpp index d81e410d6d..41c5cdb8e9 100644 --- a/src/core/hle/service/vi/vi_u.cpp +++ b/src/core/hle/service/vi/vi_u.cpp @@ -8,7 +8,7 @@ namespace Service::VI { VI_U::VI_U(std::shared_ptr module, std::shared_ptr nv_flinger) : Module::Interface(std::move(module), "vi:u", std::move(nv_flinger)) { - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, &VI_U::GetDisplayService, "GetDisplayService"}, }; RegisterHandlers(functions); diff --git a/src/core/hle/service/wlan/wlan.cpp b/src/core/hle/service/wlan/wlan.cpp index 2654594c16..818bb40548 100644 --- a/src/core/hle/service/wlan/wlan.cpp +++ b/src/core/hle/service/wlan/wlan.cpp @@ -14,7 +14,7 @@ class WLANInfra final : public ServiceFramework { public: explicit WLANInfra() : ServiceFramework{"wlan:inf"} { // clang-format off - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, nullptr, "Unknown1"}, {1, nullptr, "Unknown2"}, {2, nullptr, "GetMacAddress"}, @@ -54,7 +54,7 @@ class WLANLocal final : public ServiceFramework { public: explicit WLANLocal() : ServiceFramework{"wlan:lcl"} { // clang-format off - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, nullptr, "Unknown1"}, {1, nullptr, "Unknown2"}, {2, nullptr, "Unknown3"}, @@ -115,7 +115,7 @@ class WLANLocalGetFrame final : public ServiceFramework { public: explicit WLANLocalGetFrame() : ServiceFramework{"wlan:lg"} { // clang-format off - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, nullptr, "Unknown"}, }; // clang-format on @@ -128,7 +128,7 @@ class WLANSocketGetFrame final : public ServiceFramework { public: explicit WLANSocketGetFrame() : ServiceFramework{"wlan:sg"} { // clang-format off - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, nullptr, "Unknown"}, }; // clang-format on @@ -141,7 +141,7 @@ class WLANSocketManager final : public ServiceFramework { public: explicit WLANSocketManager() : ServiceFramework{"wlan:soc"} { // clang-format off - static const FunctionInfo functions[] = { + static constexpr FunctionInfo functions[] = { {0, nullptr, "Unknown1"}, {1, nullptr, "Unknown2"}, {2, nullptr, "Unknown3"},