aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/protocols/ForeignToplevelWlr.cpp
diff options
context:
space:
mode:
authorTom Englund <[email protected]>2024-08-26 20:24:30 +0200
committerGitHub <[email protected]>2024-08-26 20:24:30 +0200
commit72c7818ae66a18d126e2b4245d649fe3a93d3b8e (patch)
tree194361ee0d4f92eea809b7904d39f02793c55e13 /src/protocols/ForeignToplevelWlr.cpp
parent1ea47950f4262ec1215087948c7275f8e0115af2 (diff)
downloadHyprland-72c7818ae66a18d126e2b4245d649fe3a93d3b8e.tar.gz
Hyprland-72c7818ae66a18d126e2b4245d649fe3a93d3b8e.zip
misc: constify the remaining for loops (#7534)
now we roll loops at blazing constified speed.
Diffstat (limited to 'src/protocols/ForeignToplevelWlr.cpp')
-rw-r--r--src/protocols/ForeignToplevelWlr.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/protocols/ForeignToplevelWlr.cpp b/src/protocols/ForeignToplevelWlr.cpp
index bd597a91..291969db 100644
--- a/src/protocols/ForeignToplevelWlr.cpp
+++ b/src/protocols/ForeignToplevelWlr.cpp
@@ -179,7 +179,7 @@ CForeignToplevelWlrManager::CForeignToplevelWlrManager(SP<CZwlrForeignToplevelMa
PROTO::foreignToplevelWlr->onManagerResourceDestroy(this);
});
- for (auto& w : g_pCompositor->m_vWindows) {
+ for (auto const& w : g_pCompositor->m_vWindows) {
if (!w->m_bIsMapped || w->m_bFadingOut)
continue;
@@ -313,42 +313,42 @@ bool CForeignToplevelWlrManager::good() {
CForeignToplevelWlrProtocol::CForeignToplevelWlrProtocol(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) {
const auto PWINDOW = std::any_cast<PHLWINDOW>(data);
- for (auto& m : m_vManagers) {
+ for (auto const& m : m_vManagers) {
m->onMap(PWINDOW);
}
});
static auto P1 = g_pHookSystem->hookDynamic("closeWindow", [this](void* self, SCallbackInfo& info, std::any data) {
const auto PWINDOW = std::any_cast<PHLWINDOW>(data);
- for (auto& m : m_vManagers) {
+ for (auto const& m : m_vManagers) {
m->onUnmap(PWINDOW);
}
});
static auto P2 = g_pHookSystem->hookDynamic("windowTitle", [this](void* self, SCallbackInfo& info, std::any data) {
const auto PWINDOW = std::any_cast<PHLWINDOW>(data);
- for (auto& m : m_vManagers) {
+ for (auto const& m : m_vManagers) {
m->onTitle(PWINDOW);
}
});
static auto P3 = g_pHookSystem->hookDynamic("activeWindow", [this](void* self, SCallbackInfo& info, std::any data) {
const auto PWINDOW = std::any_cast<PHLWINDOW>(data);
- for (auto& m : m_vManagers) {
+ for (auto const& m : m_vManagers) {
m->onNewFocus(PWINDOW);
}
});
static auto P4 = g_pHookSystem->hookDynamic("moveWindow", [this](void* self, SCallbackInfo& info, std::any data) {
const auto PWINDOW = std::any_cast<PHLWINDOW>(std::any_cast<std::vector<std::any>>(data).at(0));
- for (auto& m : m_vManagers) {
+ for (auto const& m : m_vManagers) {
m->onMoveMonitor(PWINDOW);
}
});
static auto P5 = g_pHookSystem->hookDynamic("fullscreen", [this](void* self, SCallbackInfo& info, std::any data) {
const auto PWINDOW = std::any_cast<PHLWINDOW>(data);
- for (auto& m : m_vManagers) {
+ for (auto const& m : m_vManagers) {
m->onFullscreen(PWINDOW);
}
});
@@ -374,7 +374,7 @@ void CForeignToplevelWlrProtocol::destroyHandle(CForeignToplevelHandleWlr* handl
}
PHLWINDOW CForeignToplevelWlrProtocol::windowFromHandleResource(wl_resource* res) {
- for (auto& h : m_vHandles) {
+ for (auto const& h : m_vHandles) {
if (h->res() != res)
continue;