From 9046d4a5485452802b756869b7d27056ba9ea9d7 Mon Sep 17 00:00:00 2001 From: bunnei Date: Sun, 24 Nov 2019 20:15:51 -0500 Subject: kernel: Replace usage of boost::intrusive_ptr with std::shared_ptr for kernel objects. (#3154) * kernel: Replace usage of boost::intrusive_ptr with std::shared_ptr for kernel objects. - See https://github.com/citra-emu/citra/pull/4710 for details. --- src/core/hle/kernel/handle_table.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/core/hle/kernel/handle_table.cpp') diff --git a/src/core/hle/kernel/handle_table.cpp b/src/core/hle/kernel/handle_table.cpp index 2cc5d536b..e441a27fc 100644 --- a/src/core/hle/kernel/handle_table.cpp +++ b/src/core/hle/kernel/handle_table.cpp @@ -44,7 +44,7 @@ ResultCode HandleTable::SetSize(s32 handle_table_size) { return RESULT_SUCCESS; } -ResultVal HandleTable::Create(SharedPtr obj) { +ResultVal HandleTable::Create(std::shared_ptr obj) { DEBUG_ASSERT(obj != nullptr); const u16 slot = next_free_slot; @@ -70,7 +70,7 @@ ResultVal HandleTable::Create(SharedPtr obj) { } ResultVal HandleTable::Duplicate(Handle handle) { - SharedPtr object = GetGeneric(handle); + std::shared_ptr object = GetGeneric(handle); if (object == nullptr) { LOG_ERROR(Kernel, "Tried to duplicate invalid handle: {:08X}", handle); return ERR_INVALID_HANDLE; @@ -99,11 +99,11 @@ bool HandleTable::IsValid(Handle handle) const { return slot < table_size && objects[slot] != nullptr && generations[slot] == generation; } -SharedPtr HandleTable::GetGeneric(Handle handle) const { +std::shared_ptr HandleTable::GetGeneric(Handle handle) const { if (handle == CurrentThread) { - return GetCurrentThread(); + return SharedFrom(GetCurrentThread()); } else if (handle == CurrentProcess) { - return Core::System::GetInstance().CurrentProcess(); + return SharedFrom(Core::System::GetInstance().CurrentProcess()); } if (!IsValid(handle)) { -- cgit v1.2.3