Commit 571ca776 authored by Méven Car's avatar Méven Car Committed by Méven Car
Browse files

Screenshot effect: Convert a couple foreach loops

parent fb118a93
...@@ -241,7 +241,7 @@ void ScreenShotEffect::postPaintScreen() ...@@ -241,7 +241,7 @@ void ScreenShotEffect::postPaintScreen()
double right = m_scheduledScreenshot->width(); double right = m_scheduledScreenshot->width();
double bottom = m_scheduledScreenshot->height(); double bottom = m_scheduledScreenshot->height();
if (m_scheduledScreenshot->hasDecoration() && m_type & INCLUDE_DECORATION) { if (m_scheduledScreenshot->hasDecoration() && m_type & INCLUDE_DECORATION) {
foreach (const WindowQuad & quad, d.quads) { for (const WindowQuad &quad : qAsConst(d.quads)) {
// we need this loop to include the decoration padding // we need this loop to include the decoration padding
left = qMin(left, quad.left()); left = qMin(left, quad.left());
top = qMin(top, quad.top()); top = qMin(top, quad.top());
...@@ -254,7 +254,7 @@ void ScreenShotEffect::postPaintScreen() ...@@ -254,7 +254,7 @@ void ScreenShotEffect::postPaintScreen()
top = m_scheduledScreenshot->height(); top = m_scheduledScreenshot->height();
right = 0; right = 0;
bottom = 0; bottom = 0;
foreach (const WindowQuad & quad, d.quads) { for (const WindowQuad &quad : qAsConst(d.quads)) {
if (quad.type() == WindowQuadContents) { if (quad.type() == WindowQuadContents) {
newQuads << quad; newQuads << quad;
left = qMin(left, quad.left()); left = qMin(left, quad.left());
......
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