WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
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+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Zan Dobersek
Comment 1
2014-04-09 14:56:05 PDT
Created
attachment 228987
[details]
Patch
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
Committed
r167196
: <
http://trac.webkit.org/changeset/167196
>
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.
Top of Page
Format For Printing
XML
Clone This Bug