Skip to content

Commit

Permalink
Remove unused Registry#Clear()
Browse files Browse the repository at this point in the history
  • Loading branch information
Al2Klimov committed Nov 8, 2024
1 parent 04bd664 commit b380d29
Showing 1 changed file with 0 additions and 19 deletions.
19 changes: 0 additions & 19 deletions lib/base/registry.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,25 +30,6 @@ class Registry
RegisterInternal(name, item, lock);
}

void Clear()
{
typename Registry<U, T>::ItemMap items;

{
std::unique_lock<std::mutex> lock(m_Mutex);
items = m_Items;
}

for (const auto& kv : items) {
OnUnregistered(kv.first);
}

{
std::unique_lock<std::mutex> lock(m_Mutex);
m_Items.clear();
}
}

T GetItem(const String& name) const
{
std::unique_lock<std::mutex> lock(m_Mutex);
Expand Down

0 comments on commit b380d29

Please sign in to comment.