mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-27 09:53:47 -07:00
misc: constify the remaining for loops (#7534)
now we roll loops at blazing constified speed.
This commit is contained in:
@@ -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));
|
||||
}
|
||||
});
|
||||
|
Reference in New Issue
Block a user