[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
This commit is contained in:
Vlad Zagorodniy 2018-07-13 10:01:04 +03:00
parent a63c9ab319
commit 049c6e0966

View file

@ -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;
}