From 097caa64a5f8f6b38ceffbf19ac7dc6a6ae6157f Mon Sep 17 00:00:00 2001 From: Aleix Pol Date: Wed, 23 Sep 2020 02:01:21 +0200 Subject: [PATCH] Improve Compositor::performCompositing Prefer QVector to QList on local variables. Iterate with qAsConst on containers that should not change. --- composite.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/composite.cpp b/composite.cpp index 6d00e948f..240a0536b 100644 --- a/composite.cpp +++ b/composite.cpp @@ -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);