From d0865f2163dc670f24fc2cd567587a38cb351aca Mon Sep 17 00:00:00 2001 From: Vlad Zagorodniy Date: Wed, 10 Jul 2019 00:28:04 +0300 Subject: [PATCH] Fix -Wredundant-move MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Summary: /home/vlad/Workspace/KDE/src/kde/workspace/kwin/kcmkwin/kwindecoration/declarative-plugin/previewbridge.cpp: In member function ‘virtual std::unique_ptr KDecoration2::Preview::PreviewBridge::createClient(KDecoration2::DecoratedClient*, KDecoration2::Decoration*)’: /home/vlad/Workspace/KDE/src/kde/workspace/kwin/kcmkwin/kwindecoration/declarative-plugin/previewbridge.cpp:63:21: warning: redundant move in return statement [-Wredundant-move] 63 | return std::move(ptr); | ~~~~~~~~~^~~~~ /home/vlad/Workspace/KDE/src/kde/workspace/kwin/kcmkwin/kwindecoration/declarative-plugin/previewbridge.cpp:63:21: note: remove ‘std::move’ call /home/vlad/Workspace/KDE/src/kde/workspace/kwin/kcmkwin/kwindecoration/declarative-plugin/previewbridge.cpp: In member function ‘virtual std::unique_ptr KDecoration2::Preview::PreviewBridge::settings(KDecoration2::DecorationSettings*)’: /home/vlad/Workspace/KDE/src/kde/workspace/kwin/kcmkwin/kwindecoration/declarative-plugin/previewbridge.cpp:81:21: warning: redundant move in return statement [-Wredundant-move] 81 | return std::move(ptr); | ~~~~~~~~~^~~~~ Reviewers: #kwin, davidedmundson Reviewed By: #kwin, davidedmundson Subscribers: kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D22357 --- kcmkwin/kwindecoration/declarative-plugin/previewbridge.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kcmkwin/kwindecoration/declarative-plugin/previewbridge.cpp b/kcmkwin/kwindecoration/declarative-plugin/previewbridge.cpp index bf52a7be52..bad4cc1190 100644 --- a/kcmkwin/kwindecoration/declarative-plugin/previewbridge.cpp +++ b/kcmkwin/kwindecoration/declarative-plugin/previewbridge.cpp @@ -60,7 +60,7 @@ std::unique_ptr PreviewBridge::createClient(DecoratedCli { auto ptr = std::unique_ptr(new PreviewClient(client, decoration)); m_lastCreatedClient = ptr.get(); - return std::move(ptr); + return ptr; } void PreviewBridge::update(Decoration *decoration, const QRect &geometry) @@ -78,7 +78,7 @@ std::unique_ptr PreviewBridge::settings(DecorationSet { auto ptr = std::unique_ptr(new PreviewSettings(parent)); m_lastCreatedSettings = ptr.get(); - return std::move(ptr); + return ptr; } void PreviewBridge::registerPreviewItem(PreviewItem *item)