From 1a954b2a596fdfd4fc4b5feb9b43c8147de4cc7f Mon Sep 17 00:00:00 2001 From: Lioncash Date: Thu, 26 Nov 2020 15:19:08 -0500 Subject: service: Eliminate usages of the global system instance Completely removes all usages of the global system instance within the services code by passing in the using system instance to the services. --- src/core/hle/service/wlan/wlan.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'src/core/hle/service/wlan/wlan.cpp') diff --git a/src/core/hle/service/wlan/wlan.cpp b/src/core/hle/service/wlan/wlan.cpp index 0260d7dcf..ddbf04069 100644 --- a/src/core/hle/service/wlan/wlan.cpp +++ b/src/core/hle/service/wlan/wlan.cpp @@ -12,7 +12,7 @@ namespace Service::WLAN { class WLANInfra final : public ServiceFramework { public: - explicit WLANInfra() : ServiceFramework{"wlan:inf"} { + explicit WLANInfra(Core::System& system_) : ServiceFramework{system_, "wlan:inf"} { // clang-format off static const FunctionInfo functions[] = { {0, nullptr, "OpenMode"}, @@ -55,7 +55,7 @@ public: class WLANLocal final : public ServiceFramework { public: - explicit WLANLocal() : ServiceFramework{"wlan:lcl"} { + explicit WLANLocal(Core::System& system_) : ServiceFramework{system_, "wlan:lcl"} { // clang-format off static const FunctionInfo functions[] = { {0, nullptr, "Unknown0"}, @@ -120,7 +120,7 @@ public: class WLANLocalGetFrame final : public ServiceFramework { public: - explicit WLANLocalGetFrame() : ServiceFramework{"wlan:lg"} { + explicit WLANLocalGetFrame(Core::System& system_) : ServiceFramework{system_, "wlan:lg"} { // clang-format off static const FunctionInfo functions[] = { {0, nullptr, "Unknown"}, @@ -133,7 +133,7 @@ public: class WLANSocketGetFrame final : public ServiceFramework { public: - explicit WLANSocketGetFrame() : ServiceFramework{"wlan:sg"} { + explicit WLANSocketGetFrame(Core::System& system_) : ServiceFramework{system_, "wlan:sg"} { // clang-format off static const FunctionInfo functions[] = { {0, nullptr, "Unknown"}, @@ -146,7 +146,7 @@ public: class WLANSocketManager final : public ServiceFramework { public: - explicit WLANSocketManager() : ServiceFramework{"wlan:soc"} { + explicit WLANSocketManager(Core::System& system_) : ServiceFramework{system_, "wlan:soc"} { // clang-format off static const FunctionInfo functions[] = { {0, nullptr, "Unknown0"}, @@ -169,12 +169,12 @@ public: } }; -void InstallInterfaces(SM::ServiceManager& sm) { - std::make_shared()->InstallAsService(sm); - std::make_shared()->InstallAsService(sm); - std::make_shared()->InstallAsService(sm); - std::make_shared()->InstallAsService(sm); - std::make_shared()->InstallAsService(sm); +void InstallInterfaces(SM::ServiceManager& sm, Core::System& system) { + std::make_shared(system)->InstallAsService(sm); + std::make_shared(system)->InstallAsService(sm); + std::make_shared(system)->InstallAsService(sm); + std::make_shared(system)->InstallAsService(sm); + std::make_shared(system)->InstallAsService(sm); } } // namespace Service::WLAN -- cgit v1.2.3