refactor: use std::ranges whenever possible (#10584)
This commit is contained in:
parent
9bf1b49144
commit
9190443d95
50 changed files with 137 additions and 146 deletions
|
|
@ -123,7 +123,7 @@ int CEventManager::onClientEvent(int fd, uint32_t mask) {
|
|||
}
|
||||
|
||||
std::vector<CEventManager::SClient>::iterator CEventManager::findClientByFD(int fd) {
|
||||
return std::find_if(m_clients.begin(), m_clients.end(), [fd](const auto& client) { return client.fd.get() == fd; });
|
||||
return std::ranges::find_if(m_clients, [fd](const auto& client) { return client.fd.get() == fd; });
|
||||
}
|
||||
|
||||
std::vector<CEventManager::SClient>::iterator CEventManager::removeClientByFD(int fd) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue