From 049c6e0966ceda533e023a22f29a5d43a65cef0c Mon Sep 17 00:00:00 2001 From: Vlad Zagorodniy Date: Fri, 13 Jul 2018 10:01:04 +0300 Subject: [PATCH] [effects/slidingpopups] Use range-based for loops Reviewers: #kwin, davidedmundson Reviewed By: #kwin, davidedmundson Subscribers: davidedmundson, kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D14086 --- effects/slidingpopups/slidingpopups.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/effects/slidingpopups/slidingpopups.cpp b/effects/slidingpopups/slidingpopups.cpp index 226f626f55..8a6cab27e9 100644 --- a/effects/slidingpopups/slidingpopups.cpp +++ b/effects/slidingpopups/slidingpopups.cpp @@ -147,7 +147,7 @@ void SlidingPopupsEffect::prePaintWindow(EffectWindow* w, WindowPrePaintData& da data.quads = data.quads.splitAtX(splitPoint); WindowQuadList filtered; filtered.reserve(data.quads.count()); - foreach (const WindowQuad &quad, data.quads) { + for (const WindowQuad &quad : qAsConst(data.quads)) { if (quad.left() >= splitPoint) { filtered << quad; } @@ -160,7 +160,7 @@ void SlidingPopupsEffect::prePaintWindow(EffectWindow* w, WindowPrePaintData& da data.quads = data.quads.splitAtY(splitPoint); WindowQuadList filtered; filtered.reserve(data.quads.count()); - foreach (const WindowQuad &quad, data.quads) { + for (const WindowQuad &quad : qAsConst(data.quads)) { if (quad.top() >= splitPoint) { filtered << quad; } @@ -173,7 +173,7 @@ void SlidingPopupsEffect::prePaintWindow(EffectWindow* w, WindowPrePaintData& da data.quads = data.quads.splitAtX(splitPoint); WindowQuadList filtered; filtered.reserve(data.quads.count()); - foreach (const WindowQuad &quad, data.quads) { + for (const WindowQuad &quad : qAsConst(data.quads)) { if (quad.right() <= splitPoint) { filtered << quad; } @@ -187,7 +187,7 @@ void SlidingPopupsEffect::prePaintWindow(EffectWindow* w, WindowPrePaintData& da data.quads = data.quads.splitAtY(splitPoint); WindowQuadList filtered; filtered.reserve(data.quads.count()); - foreach (const WindowQuad &quad, data.quads) { + for (const WindowQuad &quad : qAsConst(data.quads)) { if (quad.bottom() <= splitPoint) { filtered << quad; }