mirror of
				https://github.com/Icinga/icinga2.git
				synced 2025-11-03 21:25:56 +01:00 
			
		
		
		
	Remove unused Registry#Clear()
This commit is contained in:
		
							parent
							
								
									4d7361527c
								
							
						
					
					
						commit
						a9e9e14fce
					
				@ -30,25 +30,6 @@ public:
 | 
			
		||||
		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);
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user