summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/pm
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2021-04-04 07:22:36 +0200
committerbunnei <bunneidev@gmail.com>2021-05-06 01:40:50 +0200
commit7ccbdd4d8d3dea7294d2cac38779cceea9745d52 (patch)
tree3106289a5c5a6e4bf50bc09a548c8408aa29fbad /src/core/hle/service/pm
parenthle: kernel: Refactor IPC interfaces to not use std::shared_ptr. (diff)
downloadyuzu-7ccbdd4d8d3dea7294d2cac38779cceea9745d52.tar
yuzu-7ccbdd4d8d3dea7294d2cac38779cceea9745d52.tar.gz
yuzu-7ccbdd4d8d3dea7294d2cac38779cceea9745d52.tar.bz2
yuzu-7ccbdd4d8d3dea7294d2cac38779cceea9745d52.tar.lz
yuzu-7ccbdd4d8d3dea7294d2cac38779cceea9745d52.tar.xz
yuzu-7ccbdd4d8d3dea7294d2cac38779cceea9745d52.tar.zst
yuzu-7ccbdd4d8d3dea7294d2cac38779cceea9745d52.zip
Diffstat (limited to 'src/core/hle/service/pm')
-rw-r--r--src/core/hle/service/pm/pm.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/core/hle/service/pm/pm.cpp b/src/core/hle/service/pm/pm.cpp
index 68736c40c..3a00849e1 100644
--- a/src/core/hle/service/pm/pm.cpp
+++ b/src/core/hle/service/pm/pm.cpp
@@ -17,9 +17,8 @@ constexpr ResultCode ERROR_PROCESS_NOT_FOUND{ErrorModule::PM, 1};
constexpr u64 NO_PROCESS_FOUND_PID{0};
-std::optional<std::shared_ptr<Kernel::Process>> SearchProcessList(
- const std::vector<std::shared_ptr<Kernel::Process>>& process_list,
- std::function<bool(const std::shared_ptr<Kernel::Process>&)> predicate) {
+std::optional<Kernel::Process*> SearchProcessList(const std::vector<Kernel::Process*>& process_list,
+ std::function<bool(Kernel::Process*)> predicate) {
const auto iter = std::find_if(process_list.begin(), process_list.end(), predicate);
if (iter == process_list.end()) {
@@ -30,7 +29,7 @@ std::optional<std::shared_ptr<Kernel::Process>> SearchProcessList(
}
void GetApplicationPidGeneric(Kernel::HLERequestContext& ctx,
- const std::vector<std::shared_ptr<Kernel::Process>>& process_list) {
+ const std::vector<Kernel::Process*>& process_list) {
const auto process = SearchProcessList(process_list, [](const auto& process) {
return process->GetProcessID() == Kernel::Process::ProcessIDMin;
});
@@ -125,8 +124,7 @@ private:
class Info final : public ServiceFramework<Info> {
public:
- explicit Info(Core::System& system_,
- const std::vector<std::shared_ptr<Kernel::Process>>& process_list_)
+ explicit Info(Core::System& system_, const std::vector<Kernel::Process*>& process_list_)
: ServiceFramework{system_, "pm:info"}, process_list{process_list_} {
static const FunctionInfo functions[] = {
{0, &Info::GetTitleId, "GetTitleId"},
@@ -156,7 +154,7 @@ private:
rb.Push((*process)->GetTitleID());
}
- const std::vector<std::shared_ptr<Kernel::Process>>& process_list;
+ const std::vector<Kernel::Process*>& process_list;
};
class Shell final : public ServiceFramework<Shell> {