From c3d97271335ee8c0f00a6ded0139bafa1d9199df Mon Sep 17 00:00:00 2001 From: "Alexander A. Klimov" Date: Fri, 8 Nov 2024 11:50:31 +0100 Subject: [PATCH] Inline Registry#RegisterInternal() used only once --- lib/base/registry.hpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/lib/base/registry.hpp b/lib/base/registry.hpp index ba0952ee6..6133da525 100644 --- a/lib/base/registry.hpp +++ b/lib/base/registry.hpp @@ -26,7 +26,7 @@ public: { std::unique_lock lock(m_Mutex); - RegisterInternal(name, item, lock); + m_Items[name] = item; } T GetItem(const String& name) const @@ -51,13 +51,6 @@ public: private: mutable std::mutex m_Mutex; typename Registry::ItemMap m_Items; - - void RegisterInternal(const String& name, const T& item, std::unique_lock& lock) - { - m_Items[name] = item; - - lock.unlock(); - } }; }