Bug 152677 - [GTK] Fix -Wpessimizing-move warnings after switch to WTFMove
Summary: [GTK] Fix -Wpessimizing-move warnings after switch to WTFMove
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: Other
Hardware: PC Linux
: P2 Minor
Assignee: Michael Catanzaro
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-01-03 16:51 PST by Michael Catanzaro
Modified: 2016-01-03 21:20 PST (History)
4 users (show)

See Also:


Attachments
Patch (2.83 KB, patch)
2016-01-03 16:57 PST, Michael Catanzaro
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Catanzaro 2016-01-03 16:51:17 PST
Now that we have switched from WTF::move to the macro WTFMove, we've triggered some good clang warnings that our use of WTF::move was hiding.

[1015/3230] Building CXX object Source...r/platform/glib/KeyedDecoderGlib.cpp.o
../../Source/WebCore/platform/glib/KeyedDecoderGlib.cpp:61:12: warning: moving a local object in a return statement prevents copy elision [-Wpessimizing-move]
    return std::move<WTF::CheckMoveParameter>(dictionary);
           ^
../../Source/WebCore/platform/glib/KeyedDecoderGlib.cpp:61:12: note: remove std::move call here
    return std::move<WTF::CheckMoveParameter>(dictionary);
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~          ~
1 warning generated.
[1038/3230] Building CXX object Source...atform/graphics/egl/GLContextEGL.cpp.o
../../Source/WebCore/platform/graphics/egl/GLContextEGL.cpp:212:12: warning: moving a local object in a return statement prevents copy elision [-Wpessimizing-move]
    return std::move<WTF::CheckMoveParameter>(context);
           ^
../../Source/WebCore/platform/graphics/egl/GLContextEGL.cpp:212:12: note: remove std::move call here
    return std::move<WTF::CheckMoveParameter>(context);
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~       ~
1 warning generated.
[1046/3230] Building CXX object Source...atform/graphics/glx/GLContextGLX.cpp.o
../../Source/WebCore/platform/graphics/glx/GLContextGLX.cpp:139:12: warning: moving a local object in a return statement prevents copy elision [-Wpessimizing-move]
    return std::move<WTF::CheckMoveParameter>(context);
           ^
../../Source/WebCore/platform/graphics/glx/GLContextGLX.cpp:139:12: note: remove std::move call here
    return std::move<WTF::CheckMoveParameter>(context);
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~       ~
1 warning generated.
Comment 1 Michael Catanzaro 2016-01-03 16:57:37 PST
Created attachment 268159 [details]
Patch
Comment 2 WebKit Commit Bot 2016-01-03 21:20:39 PST
Comment on attachment 268159 [details]
Patch

Clearing flags on attachment: 268159

Committed r194527: <http://trac.webkit.org/changeset/194527>
Comment 3 WebKit Commit Bot 2016-01-03 21:20:43 PST
All reviewed patches have been landed.  Closing bug.