summaryrefslogtreecommitdiff
path: root/src/desktop/Subsurface.cpp
diff options
context:
space:
mode:
authorTom Englund <tomenglund26@gmail.com>2024-08-26 20:24:30 +0200
committerGitHub <noreply@github.com>2024-08-26 20:24:30 +0200
commit72c7818ae66a18d126e2b4245d649fe3a93d3b8e (patch)
tree194361ee0d4f92eea809b7904d39f02793c55e13 /src/desktop/Subsurface.cpp
parent1ea47950f4262ec1215087948c7275f8e0115af2 (diff)
misc: constify the remaining for loops (#7534)
now we roll loops at blazing constified speed.
Diffstat (limited to 'src/desktop/Subsurface.cpp')
-rw-r--r--src/desktop/Subsurface.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/desktop/Subsurface.cpp b/src/desktop/Subsurface.cpp
index 71ee16f0..64dd7cf5 100644
--- a/src/desktop/Subsurface.cpp
+++ b/src/desktop/Subsurface.cpp
@@ -65,7 +65,7 @@ void CSubsurface::checkSiblingDamage() {
const double SCALE = m_pWindowParent.lock() && m_pWindowParent->m_bIsX11 ? 1.0 / m_pWindowParent->m_fX11SurfaceScaledBy : 1.0;
- for (auto& n : m_pParent->m_vChildren) {
+ for (auto const& n : m_pParent->m_vChildren) {
if (n.get() == this)
continue;
@@ -75,7 +75,7 @@ void CSubsurface::checkSiblingDamage() {
}
void CSubsurface::recheckDamageForSubsurfaces() {
- for (auto& n : m_vChildren) {
+ for (auto const& n : m_vChildren) {
const auto COORDS = n->coordsGlobal();
g_pHyprRenderer->damageSurface(n->m_pWLSurface->resource(), COORDS.x, COORDS.y);
}
@@ -183,7 +183,7 @@ Vector2D CSubsurface::coordsGlobal() {
}
void CSubsurface::initExistingSubsurfaces(SP<CWLSurfaceResource> pSurface) {
- for (auto& s : pSurface->subsurfaces) {
+ for (auto const& s : pSurface->subsurfaces) {
if (!s || s->surface->hlSurface /* already assigned */)
continue;
onNewSubsurface(s.lock());