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
|
|
@ -36,7 +36,7 @@ bool CFocusGrab::good() {
|
|||
}
|
||||
|
||||
bool CFocusGrab::isSurfaceComitted(SP<CWLSurfaceResource> surface) {
|
||||
auto iter = std::find_if(m_surfaces.begin(), m_surfaces.end(), [surface](const auto& o) { return o.first == surface; });
|
||||
auto iter = std::ranges::find_if(m_surfaces, [surface](const auto& o) { return o.first == surface; });
|
||||
if (iter == m_surfaces.end())
|
||||
return false;
|
||||
|
||||
|
|
@ -70,7 +70,7 @@ void CFocusGrab::finish(bool sendCleared) {
|
|||
}
|
||||
|
||||
void CFocusGrab::addSurface(SP<CWLSurfaceResource> surface) {
|
||||
auto iter = std::find_if(m_surfaces.begin(), m_surfaces.end(), [surface](const auto& e) { return e.first == surface; });
|
||||
auto iter = std::ranges::find_if(m_surfaces, [surface](const auto& e) { return e.first == surface; });
|
||||
if (iter == m_surfaces.end())
|
||||
m_surfaces.emplace(surface, makeUnique<CFocusGrabSurfaceState>(this, surface));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue