Fix -Wredundant-move

Summary:
    /home/vlad/Workspace/KDE/src/kde/workspace/kwin/kcmkwin/kwindecoration/declarative-plugin/previewbridge.cpp: In member function ‘virtual std::unique_ptr<KDecoration2::DecoratedClientPrivate> 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::DecorationSettingsPrivate> 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
This commit is contained in:
Vlad Zagorodniy 2019-07-10 00:28:04 +03:00
parent 927f579df9
commit d0865f2163

View file

@ -60,7 +60,7 @@ std::unique_ptr<DecoratedClientPrivate> PreviewBridge::createClient(DecoratedCli
{
auto ptr = std::unique_ptr<PreviewClient>(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<DecorationSettingsPrivate> PreviewBridge::settings(DecorationSet
{
auto ptr = std::unique_ptr<PreviewSettings>(new PreviewSettings(parent));
m_lastCreatedSettings = ptr.get();
return std::move(ptr);
return ptr;
}
void PreviewBridge::registerPreviewItem(PreviewItem *item)