Fix -Wredundant-move
ClosedPublic

Authored by zzag on Jul 9 2019, 9:30 PM.

Details

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);
      |            ~~~~~~~~~^~~~~

Diff Detail

Repository
R108 KWin
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
zzag created this revision.Jul 9 2019, 9:30 PM
Restricted Application added a project: KWin. · View Herald TranscriptJul 9 2019, 9:30 PM
Restricted Application added a subscriber: kwin. · View Herald Transcript
zzag requested review of this revision.Jul 9 2019, 9:30 PM
davidedmundson accepted this revision.Jul 9 2019, 9:30 PM
This revision is now accepted and ready to land.Jul 9 2019, 9:30 PM
This revision was automatically updated to reflect the committed changes.