mirror of
https://github.com/Icinga/icinga2.git
synced 2026-02-03 20:40:17 -05:00
Inline Registry#RegisterInternal() used only once
This commit is contained in:
parent
87a2f9fade
commit
c3d9727133
1 changed files with 1 additions and 8 deletions
|
|
@ -26,7 +26,7 @@ public:
|
|||
{
|
||||
std::unique_lock<std::mutex> 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<U, T>::ItemMap m_Items;
|
||||
|
||||
void RegisterInternal(const String& name, const T& item, std::unique_lock<std::mutex>& lock)
|
||||
{
|
||||
m_Items[name] = item;
|
||||
|
||||
lock.unlock();
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue