Commit 049c6e09 authored by Vlad Zahorodnii's avatar Vlad Zahorodnii

[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
parent a63c9ab3
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment