From 9e726a9250033f5c8fbddd917c7779b808d99705 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Tue, 4 May 2021 04:04:05 -0400 Subject: service: Resolve cases of member field shadowing Now all that remains is for kernel code to be 'shadow-free' and then -Wshadow can be turned into an error. --- src/core/hle/service/pctl/module.cpp | 10 ++++------ src/core/hle/service/pctl/module.h | 4 ++-- 2 files changed, 6 insertions(+), 8 deletions(-) (limited to 'src/core/hle/service/pctl') diff --git a/src/core/hle/service/pctl/module.cpp b/src/core/hle/service/pctl/module.cpp index dc59702f1..96f6e90d0 100644 --- a/src/core/hle/service/pctl/module.cpp +++ b/src/core/hle/service/pctl/module.cpp @@ -24,9 +24,8 @@ constexpr ResultCode ResultNoRestrictionEnabled{ErrorModule::PCTL, 181}; class IParentalControlService final : public ServiceFramework { public: - explicit IParentalControlService(Core::System& system_, Capability capability) - : ServiceFramework{system_, "IParentalControlService"}, system(system_), - capability(capability) { + explicit IParentalControlService(Core::System& system_, Capability capability_) + : ServiceFramework{system_, "IParentalControlService"}, capability{capability_} { // clang-format off static const FunctionInfo functions[] = { {1, &IParentalControlService::Initialize, "Initialize"}, @@ -363,7 +362,6 @@ private: ParentalControlSettings settings{}; std::array pin_code{}; bool can_use_stereo_vision = true; - Core::System& system; Capability capability{}; }; @@ -386,8 +384,8 @@ void Module::Interface::CreateServiceWithoutInitialize(Kernel::HLERequestContext } Module::Interface::Interface(Core::System& system_, std::shared_ptr module_, - const char* name, Capability capability) - : ServiceFramework{system_, name}, module{std::move(module_)}, capability(capability) {} + const char* name_, Capability capability_) + : ServiceFramework{system_, name_}, module{std::move(module_)}, capability{capability_} {} Module::Interface::~Interface() = default; diff --git a/src/core/hle/service/pctl/module.h b/src/core/hle/service/pctl/module.h index 032481b00..f25c5c557 100644 --- a/src/core/hle/service/pctl/module.h +++ b/src/core/hle/service/pctl/module.h @@ -28,8 +28,8 @@ class Module final { public: class Interface : public ServiceFramework { public: - explicit Interface(Core::System& system_, std::shared_ptr module_, const char* name, - Capability capability); + explicit Interface(Core::System& system_, std::shared_ptr module_, + const char* name_, Capability capability_); ~Interface() override; void CreateService(Kernel::HLERequestContext& ctx); -- cgit v1.2.3