From 7934c03ac22a3018240232b5835a401a644fb054 Mon Sep 17 00:00:00 2001 From: Vlad Zagorodniy Date: Sat, 12 Jan 2019 14:39:28 +0200 Subject: [PATCH] Drop Phase2Data constructors Summary: We initialize all fields of Phase2Data at once, so the constructors seem to be redundant. Reviewers: #kwin, graesslin Reviewed By: #kwin, graesslin Subscribers: kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D18207 --- scene.cpp | 2 +- scene.h | 10 ++-------- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/scene.cpp b/scene.cpp index fa91f619f2..3c4edbab8e 100644 --- a/scene.cpp +++ b/scene.cpp @@ -232,7 +232,7 @@ void Scene::paintGenericScreen(int orig_mask, ScreenPaintData) if (!w->isPaintingEnabled()) { continue; } - phase2.append(Phase2Data(w, infiniteRegion(), data.clip, data.mask, data.quads)); + phase2.append({w, infiniteRegion(), data.clip, data.mask, data.quads}); } foreach (const Phase2Data & d, phase2) { diff --git a/scene.h b/scene.h index 90948ef906..7db70fa89d 100644 --- a/scene.h +++ b/scene.h @@ -228,16 +228,10 @@ protected: void updateTimeDiff(); // saved data for 2nd pass of optimized screen painting struct Phase2Data { - Phase2Data(Window* w, QRegion r, QRegion c, int m, const WindowQuadList& q) - : window(w), region(r), clip(c), mask(m), quads(q) {} - Phase2Data() { - window = 0; - mask = 0; - } - Window* window; + Window *window = nullptr; QRegion region; QRegion clip; - int mask; + int mask = 0; WindowQuadList quads; }; // The region which actually has been painted by paintScreen() and should be