Bug 152677

Summary: [GTK] Fix -Wpessimizing-move warnings after switch to WTFMove
Product: WebKit Reporter: Michael Catanzaro <mcatanzaro>
Component: WebKitGTKAssignee: Michael Catanzaro <mcatanzaro>
Status: RESOLVED FIXED    
Severity: Minor CC: aestes, bugs-noreply, commit-queue, mcatanzaro
Priority: P2    
Version: Other   
Hardware: PC   
OS: Linux   
Attachments:
Description Flags
Patch none

Michael Catanzaro
Reported 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.
Attachments
Patch (2.83 KB, patch)
2016-01-03 16:57 PST, Michael Catanzaro
no flags
Michael Catanzaro
Comment 1 2016-01-03 16:57:37 PST
WebKit Commit Bot
Comment 2 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>
WebKit Commit Bot
Comment 3 2016-01-03 21:20:43 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.