diff options
| author | 2021-05-16 01:46:30 -0400 | |
|---|---|---|
| committer | 2021-05-16 03:43:16 -0400 | |
| commit | 9a07ed53ebe4e27ef1a14e0469037cab9fb7b1e7 (patch) | |
| tree | 54d6c5a6b319a10522b068caf2b0600c8f27876a /src/core/hle/service/pm | |
| parent | Merge pull request #6316 from ameerj/title-fix (diff) | |
| download | yuzu-9a07ed53ebe4e27ef1a14e0469037cab9fb7b1e7.tar.gz yuzu-9a07ed53ebe4e27ef1a14e0469037cab9fb7b1e7.tar.xz yuzu-9a07ed53ebe4e27ef1a14e0469037cab9fb7b1e7.zip | |
core: Make variable shadowing a compile-time error
Now that we have most of core free of shadowing, we can enable the
warning as an error to catch anything that may be remaining and also
eliminate this class of logic bug entirely.
Diffstat (limited to 'src/core/hle/service/pm')
| -rw-r--r-- | src/core/hle/service/pm/pm.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/core/hle/service/pm/pm.cpp b/src/core/hle/service/pm/pm.cpp index f4715935d..a43185c44 100644 --- a/src/core/hle/service/pm/pm.cpp +++ b/src/core/hle/service/pm/pm.cpp | |||
| @@ -31,8 +31,8 @@ std::optional<Kernel::KProcess*> SearchProcessList( | |||
| 31 | 31 | ||
| 32 | void GetApplicationPidGeneric(Kernel::HLERequestContext& ctx, | 32 | void GetApplicationPidGeneric(Kernel::HLERequestContext& ctx, |
| 33 | const std::vector<Kernel::KProcess*>& process_list) { | 33 | const std::vector<Kernel::KProcess*>& process_list) { |
| 34 | const auto process = SearchProcessList(process_list, [](const auto& process) { | 34 | const auto process = SearchProcessList(process_list, [](const auto& proc) { |
| 35 | return process->GetProcessID() == Kernel::KProcess::ProcessIDMin; | 35 | return proc->GetProcessID() == Kernel::KProcess::ProcessIDMin; |
| 36 | }); | 36 | }); |
| 37 | 37 | ||
| 38 | IPC::ResponseBuilder rb{ctx, 4}; | 38 | IPC::ResponseBuilder rb{ctx, 4}; |
| @@ -100,8 +100,8 @@ private: | |||
| 100 | LOG_DEBUG(Service_PM, "called, title_id={:016X}", title_id); | 100 | LOG_DEBUG(Service_PM, "called, title_id={:016X}", title_id); |
| 101 | 101 | ||
| 102 | const auto process = | 102 | const auto process = |
| 103 | SearchProcessList(kernel.GetProcessList(), [title_id](const auto& process) { | 103 | SearchProcessList(kernel.GetProcessList(), [title_id](const auto& proc) { |
| 104 | return process->GetTitleID() == title_id; | 104 | return proc->GetTitleID() == title_id; |
| 105 | }); | 105 | }); |
| 106 | 106 | ||
| 107 | if (!process.has_value()) { | 107 | if (!process.has_value()) { |
| @@ -140,8 +140,8 @@ private: | |||
| 140 | 140 | ||
| 141 | LOG_DEBUG(Service_PM, "called, process_id={:016X}", process_id); | 141 | LOG_DEBUG(Service_PM, "called, process_id={:016X}", process_id); |
| 142 | 142 | ||
| 143 | const auto process = SearchProcessList(process_list, [process_id](const auto& process) { | 143 | const auto process = SearchProcessList(process_list, [process_id](const auto& proc) { |
| 144 | return process->GetProcessID() == process_id; | 144 | return proc->GetProcessID() == process_id; |
| 145 | }); | 145 | }); |
| 146 | 146 | ||
| 147 | if (!process.has_value()) { | 147 | if (!process.has_value()) { |