Remove unnecessary uses of std::move() in return statements
Created attachment 228987 [details] Patch
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.
Committed r167196: <http://trac.webkit.org/changeset/167196>
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.