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:
parent
927f579df9
commit
d0865f2163
1 changed files with 2 additions and 2 deletions
|
@ -60,7 +60,7 @@ std::unique_ptr<DecoratedClientPrivate> PreviewBridge::createClient(DecoratedCli
|
||||||
{
|
{
|
||||||
auto ptr = std::unique_ptr<PreviewClient>(new PreviewClient(client, decoration));
|
auto ptr = std::unique_ptr<PreviewClient>(new PreviewClient(client, decoration));
|
||||||
m_lastCreatedClient = ptr.get();
|
m_lastCreatedClient = ptr.get();
|
||||||
return std::move(ptr);
|
return ptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
void PreviewBridge::update(Decoration *decoration, const QRect &geometry)
|
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));
|
auto ptr = std::unique_ptr<PreviewSettings>(new PreviewSettings(parent));
|
||||||
m_lastCreatedSettings = ptr.get();
|
m_lastCreatedSettings = ptr.get();
|
||||||
return std::move(ptr);
|
return ptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
void PreviewBridge::registerPreviewItem(PreviewItem *item)
|
void PreviewBridge::registerPreviewItem(PreviewItem *item)
|
||||||
|
|
Loading…
Reference in a new issue