misc: constify the remaining for loops (#7534)

now we roll loops at blazing constified speed.
This commit is contained in:
Tom Englund
2024-08-26 20:24:30 +02:00
committed by GitHub
parent 1ea47950f4
commit 72c7818ae6
79 changed files with 472 additions and 472 deletions

View File

@@ -417,7 +417,7 @@ void CXWM::focusWindow(SP<CXWaylandSurface> surf) {
// send state to all toplevel surfaces, sometimes we might lose some
// that could still stick with the focused atom
for (auto& s : mappedSurfaces) {
for (auto const& s : mappedSurfaces) {
if (!s || s->overrideRedirect)
continue;
@@ -1025,7 +1025,7 @@ void CXWM::updateClientList() {
std::erase_if(mappedSurfacesStacking, [](const auto& e) { return e.expired() || !e->mapped; });
std::vector<xcb_window_t> windows;
for (auto& m : mappedSurfaces) {
for (auto const& m : mappedSurfaces) {
windows.push_back(m->xID);
}
@@ -1033,7 +1033,7 @@ void CXWM::updateClientList() {
windows.clear();
for (auto& m : mappedSurfacesStacking) {
for (auto const& m : mappedSurfacesStacking) {
windows.push_back(m->xID);
}