diff options
| author | Tom Englund <tomenglund26@gmail.com> | 2024-08-26 20:24:30 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-08-26 20:24:30 +0200 |
| commit | 72c7818ae66a18d126e2b4245d649fe3a93d3b8e (patch) | |
| tree | 194361ee0d4f92eea809b7904d39f02793c55e13 /src/protocols/ForeignToplevel.cpp | |
| parent | 1ea47950f4262ec1215087948c7275f8e0115af2 (diff) | |
misc: constify the remaining for loops (#7534)
now we roll loops at blazing constified speed.
Diffstat (limited to 'src/protocols/ForeignToplevel.cpp')
| -rw-r--r-- | src/protocols/ForeignToplevel.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/protocols/ForeignToplevel.cpp b/src/protocols/ForeignToplevel.cpp index 59888ce2..1f8cbcbe 100644 --- a/src/protocols/ForeignToplevel.cpp +++ b/src/protocols/ForeignToplevel.cpp @@ -30,7 +30,7 @@ CForeignToplevelList::CForeignToplevelList(SP<CExtForeignToplevelListV1> resourc LOGM(LOG, "CForeignToplevelList: finished"); }); - for (auto& w : g_pCompositor->m_vWindows) { + for (auto const& w : g_pCompositor->m_vWindows) { if (!w->m_bIsMapped || w->m_bFadingOut) continue; @@ -112,19 +112,19 @@ bool CForeignToplevelList::good() { CForeignToplevelProtocol::CForeignToplevelProtocol(const wl_interface* iface, const int& ver, const std::string& name) : IWaylandProtocol(iface, ver, name) { static auto P = g_pHookSystem->hookDynamic("openWindow", [this](void* self, SCallbackInfo& info, std::any data) { - for (auto& m : m_vManagers) { + for (auto const& m : m_vManagers) { m->onMap(std::any_cast<PHLWINDOW>(data)); } }); static auto P1 = g_pHookSystem->hookDynamic("closeWindow", [this](void* self, SCallbackInfo& info, std::any data) { - for (auto& m : m_vManagers) { + for (auto const& m : m_vManagers) { m->onUnmap(std::any_cast<PHLWINDOW>(data)); } }); static auto P2 = g_pHookSystem->hookDynamic("windowTitle", [this](void* self, SCallbackInfo& info, std::any data) { - for (auto& m : m_vManagers) { + for (auto const& m : m_vManagers) { m->onTitle(std::any_cast<PHLWINDOW>(data)); } }); |
