RESOLVED FIXED Bug 131457
Remove unnecessary uses of std::move() in return statements
https://bugs.webkit.org/show_bug.cgi?id=131457
Summary Remove unnecessary uses of std::move() in return statements
Zan Dobersek
Reported 2014-04-09 14:53:29 PDT
Remove unnecessary uses of std::move() in return statements
Attachments
Patch (7.46 KB, patch)
2014-04-09 14:56 PDT, Zan Dobersek
darin: review+
Zan Dobersek
Comment 1 2014-04-09 14:56:05 PDT
Darin Adler
Comment 2 2014-04-12 12:37:03 PDT
Comment on attachment 228987 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=228987&action=review > Source/WebCore/platform/RemoteCommandListener.cpp:34 > + return std::unique_ptr<RemoteCommandListener>(new RemoteCommandListener(client)); This needs to use make_unique, not unique_ptr/new. > Source/WebCore/platform/ios/RemoteCommandListenerIOS.mm:44 > + return std::unique_ptr<RemoteCommandListener>(new RemoteCommandListenerIOS(client)); This needs to use make_unique, not unique_ptr/new.
Zan Dobersek
Comment 3 2014-04-13 07:19:49 PDT
Zan Dobersek
Comment 4 2014-04-13 09:34:16 PDT
Comment on attachment 228987 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=228987&action=review >> Source/WebCore/platform/RemoteCommandListener.cpp:34 >> + return std::unique_ptr<RemoteCommandListener>(new RemoteCommandListener(client)); > > This needs to use make_unique, not unique_ptr/new. I managed to break the build by using std::make_unique() without the constructor being public, but I reverted back to using the std::unique_ptr<RemoteCommandListener> constructor rather than making the constructor accessible. Doing that wouldn't make much sense with RemoteCommandListener::create() set up to elegantly return an object of specific class on the iOS platform and an object of the general class on other platforms. I'd rather address this once it becomes trivial to declare std::make_unique<>() as a friend of some specific class.
Note You need to log in before you can comment on or make changes to this bug.