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

@@ -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));
}
});