From aa2844bcf9b2b9bca2ce263270b963ffd13b05e7 Mon Sep 17 00:00:00 2001 From: bunnei Date: Tue, 20 Apr 2021 22:18:56 -0700 Subject: hle: kernel: HandleTable: Remove deprecated APIs. --- src/core/hle/kernel/handle_table.h | 32 ++++---------------------------- 1 file changed, 4 insertions(+), 28 deletions(-) (limited to 'src/core/hle/kernel/handle_table.h') diff --git a/src/core/hle/kernel/handle_table.h b/src/core/hle/kernel/handle_table.h index d6abdcd47..2e0b2d8b8 100644 --- a/src/core/hle/kernel/handle_table.h +++ b/src/core/hle/kernel/handle_table.h @@ -70,13 +70,6 @@ public: */ ResultCode SetSize(s32 handle_table_size); - /** - * Allocates a handle for the given object. - * @return The created Handle or one of the following errors: - * - `ERR_HANDLE_TABLE_FULL`: the maximum number of handles has been exceeded. - */ - ResultVal Create(Object* obj); - /** * Returns a new handle that points to the same object as the passed in handle. * @return The duplicated Handle or one of the following errors: @@ -95,29 +88,13 @@ public: /// Checks if a handle is valid and points to an existing object. bool IsValid(Handle handle) const; - /** - * Looks up a handle. - * @return Pointer to the looked-up object, or `nullptr` if the handle is not valid. - */ - Object* GetGeneric(Handle handle) const; - - /** - * Looks up a handle while verifying its type. - * @return Pointer to the looked-up object, or `nullptr` if the handle is not valid or its - * type differs from the requested one. - */ - template - T* Get(Handle handle) const { - return DynamicObjectCast(GetGeneric(handle)); - } - template KAutoObject* GetObjectImpl(Handle handle) const { if (!IsValid(handle)) { return nullptr; } - auto* obj = objects_new[static_cast(handle >> 15)]; + auto* obj = objects[static_cast(handle >> 15)]; return obj->DynamicCast(); } @@ -133,7 +110,7 @@ public: return nullptr; } - auto* obj = objects_new[static_cast(handle >> 15)]; + auto* obj = objects[static_cast(handle >> 15)]; return obj->DynamicCast(); } @@ -142,7 +119,7 @@ public: if (!IsValid(handle)) { return nullptr; } - auto* obj = objects_new[static_cast(handle >> 15)]; + auto* obj = objects[static_cast(handle >> 15)]; return obj->DynamicCast(); } @@ -203,8 +180,7 @@ public: private: /// Stores the Object referenced by the handle or null if the slot is empty. - std::array, MAX_COUNT> objects; - std::array objects_new{}; + std::array objects{}; /** * The value of `next_generation` when the handle was created, used to check for validity. For -- cgit v1.2.3