diff options
| author | bunnei <bunneidev@gmail.com> | 2018-10-10 10:34:20 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-10-10 10:34:20 -0400 |
| commit | 68b3d8b7a974780ff1eef3fe5764b2dd9cdb4d32 (patch) | |
| tree | 1c5d3e1b178d7252cd3e752d8f2a99017a0ecb6d /src/core/hle/kernel/kernel.cpp | |
| parent | 5461b21c7ac66c5f01e122faeaf843b3ea939852 (diff) | |
| parent | 5c0408596f6ccf5d2b171321bac386713b169d5b (diff) | |
Merge pull request #1469 from lioncash/ptr
kernel/thread: Use a regular pointer for the owner/current process
Diffstat (limited to 'src/core/hle/kernel/kernel.cpp')
| -rw-r--r-- | src/core/hle/kernel/kernel.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/core/hle/kernel/kernel.cpp b/src/core/hle/kernel/kernel.cpp index 98eb74298..bd680adfe 100644 --- a/src/core/hle/kernel/kernel.cpp +++ b/src/core/hle/kernel/kernel.cpp @@ -116,7 +116,7 @@ struct KernelCore::Impl { next_thread_id = 1; process_list.clear(); - current_process.reset(); + current_process = nullptr; handle_table.Clear(); resource_limits.fill(nullptr); @@ -207,7 +207,7 @@ struct KernelCore::Impl { // Lists all processes that exist in the current session. std::vector<SharedPtr<Process>> process_list; - SharedPtr<Process> current_process; + Process* current_process = nullptr; Kernel::HandleTable handle_table; std::array<SharedPtr<ResourceLimit>, 4> resource_limits; @@ -266,15 +266,15 @@ void KernelCore::AppendNewProcess(SharedPtr<Process> process) { impl->process_list.push_back(std::move(process)); } -void KernelCore::MakeCurrentProcess(SharedPtr<Process> process) { - impl->current_process = std::move(process); +void KernelCore::MakeCurrentProcess(Process* process) { + impl->current_process = process; } -SharedPtr<Process>& KernelCore::CurrentProcess() { +Process* KernelCore::CurrentProcess() { return impl->current_process; } -const SharedPtr<Process>& KernelCore::CurrentProcess() const { +const Process* KernelCore::CurrentProcess() const { return impl->current_process; } |
