Open alexey-malov opened 7 years ago
void RegisterObserver(IObserver<T> & observer, size_t priority) { m_observers.emplace(priority, &observer); } void RemoveObserver(ObserverType & observer) override { for (auto it = m_observers.begin(); it != m_observers.end(); ++it) { if (it->second == &observer) { m_observers.erase(it); break; } } }