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
|
|
@ -94,7 +94,7 @@ bool CPointerManager::hasCursor() {
|
|||
}
|
||||
|
||||
SP<CPointerManager::SMonitorPointerState> CPointerManager::stateFor(PHLMONITOR mon) {
|
||||
auto it = std::find_if(m_monitorStates.begin(), m_monitorStates.end(), [mon](const auto& other) { return other->monitor == mon; });
|
||||
auto it = std::ranges::find_if(m_monitorStates, [mon](const auto& other) { return other->monitor == mon; });
|
||||
if (it == m_monitorStates.end())
|
||||
return m_monitorStates.emplace_back(makeShared<CPointerManager::SMonitorPointerState>(mon));
|
||||
return *it;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue