From 6dc938907f70e6000994a9ced8387da52ee551a6 Mon Sep 17 00:00:00 2001 From: David Faure Date: Sat, 4 Apr 2020 23:11:23 +0200 Subject: [PATCH] kwin: fix compilation error with strict iterators Summary: After insert(), image seems to be set already, no need to copy it again? Test Plan: Builds Reviewers: apol Reviewed By: apol Subscribers: kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D28578 --- pointer_input.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pointer_input.cpp b/pointer_input.cpp index edc81f8d39..2d3a29b6a7 100644 --- a/pointer_input.cpp +++ b/pointer_input.cpp @@ -1306,9 +1306,10 @@ void WaylandCursorImage::loadThemeCursor(const T &shape, QHash &cursor auto it = cursors.constFind(shape); if (it == cursors.constEnd()) { loadThemeCursor(shape, image); - it = cursors.insert(shape, *image); + cursors.insert(shape, *image); + } else { + *image = it.value(); } - *image = it.value(); } void CursorImage::reevaluteSource()