Commit 097caa64 authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧 Committed by Aleix Pol Gonzalez

Improve Compositor::performCompositing

Prefer QVector to QList on local variables.
Iterate with qAsConst on containers that should not change.
parent f1233a64
......@@ -617,7 +617,7 @@ void Compositor::performCompositing()
// Reset the damage state of each window and fetch the damage region
// without waiting for a reply
for (Toplevel *win : windows) {
for (Toplevel *win : qAsConst(windows)) {
if (win->resetAndFetchDamage()) {
damaged << win;
}
......@@ -638,7 +638,7 @@ void Compositor::performCompositing()
}
// Get the replies
for (Toplevel *win : damaged) {
for (Toplevel *win : qAsConst(damaged)) {
// Discard the cached lanczos texture
if (win->effectWindow()) {
const QVariant texture = win->effectWindow()->data(LanczosCacheRole);
......
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