-auto it = notifiers.begin();
-while (it != notifiers.end())
- {
- if (it->GetUserPtr() == userPtr)
- {
- userPtr->GetProperties().tariffName.DelAfterNotifier(&(*it));
- notifiers.erase(it);
- break;
- }
- ++it;
- }
+ m_conns.erase(std::remove_if(m_conns.begin(), m_conns.end(),
+ [userPtr](const auto& c){ return std::get<0>(c) == userPtr->GetID(); }),
+ m_conns.end());