diff options
author | liamwhite <liamwhite@users.noreply.github.com> | 2022-11-22 23:47:53 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-22 23:47:53 +0100 |
commit | 168c9ee3415bf6400ef0b0cc0eb2dfa73fac2464 (patch) | |
tree | 135fb961ff5f842da81a1f06e2835ed8e49b5e25 /src/core/hle/kernel/k_handle_table.h | |
parent | Merge pull request #9219 from german77/nfc_impl (diff) | |
parent | k_handle_table: Remove cast to void* in GetObjectForIpc (diff) | |
download | yuzu-168c9ee3415bf6400ef0b0cc0eb2dfa73fac2464.tar yuzu-168c9ee3415bf6400ef0b0cc0eb2dfa73fac2464.tar.gz yuzu-168c9ee3415bf6400ef0b0cc0eb2dfa73fac2464.tar.bz2 yuzu-168c9ee3415bf6400ef0b0cc0eb2dfa73fac2464.tar.lz yuzu-168c9ee3415bf6400ef0b0cc0eb2dfa73fac2464.tar.xz yuzu-168c9ee3415bf6400ef0b0cc0eb2dfa73fac2464.tar.zst yuzu-168c9ee3415bf6400ef0b0cc0eb2dfa73fac2464.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/kernel/k_handle_table.h | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/src/core/hle/kernel/k_handle_table.h b/src/core/hle/kernel/k_handle_table.h index 65cae3b27..37a24e7d9 100644 --- a/src/core/hle/kernel/k_handle_table.h +++ b/src/core/hle/kernel/k_handle_table.h @@ -113,21 +113,7 @@ public: return this->GetObjectImpl(handle); } - KScopedAutoObject<KAutoObject> GetObjectForIpc(Handle handle, KThread* cur_thread) const { - // Handle pseudo-handles. - ASSERT(cur_thread != nullptr); - if (handle == Svc::PseudoHandle::CurrentProcess) { - auto* const cur_process = - static_cast<KAutoObject*>(static_cast<void*>(cur_thread->GetOwnerProcess())); - ASSERT(cur_process != nullptr); - return cur_process; - } - if (handle == Svc::PseudoHandle::CurrentThread) { - return static_cast<KAutoObject*>(cur_thread); - } - - return GetObjectForIpcWithoutPseudoHandle(handle); - } + KScopedAutoObject<KAutoObject> GetObjectForIpc(Handle handle, KThread* cur_thread) const; KScopedAutoObject<KAutoObject> GetObjectByIndex(Handle* out_handle, size_t index) const { KScopedDisableDispatch dd{m_kernel}; |