From 4b6f8d2f62944299b5df2eaa97ef2bb515897d38 Mon Sep 17 00:00:00 2001 From: Nekotekina Date: Wed, 22 Feb 2017 12:57:39 +0300 Subject: [PATCH] fxm::check_unlocked added --- rpcs3/Emu/IdManager.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/rpcs3/Emu/IdManager.h b/rpcs3/Emu/IdManager.h index 6fadac64f8..b38f229790 100644 --- a/rpcs3/Emu/IdManager.h +++ b/rpcs3/Emu/IdManager.h @@ -841,13 +841,20 @@ public: return ptr; } + // Unsafe version of check(), can be used in some cases + template + static inline T* check_unlocked() + { + return static_cast(g_vec[get_type()].second.get()); + } + // Check whether the object exists template static inline T* check() { reader_lock lock(id_manager::g_mutex); - return static_cast(g_vec[get_type()].second.get()); + return check_unlocked(); } // Get the object (returns nullptr if it doesn't exist)