⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 167590 in webkit


Ignore:
Timestamp:
Apr 21, 2014, 3:39:51 AM (12 years ago)
Author:
zandobersek@gmail.com
Message:

iOS and non-iOS RemoteCommandListener::create() functions should use std::make_unique<>()
https://bugs.webkit.org/show_bug.cgi?id=131916

Reviewed by Darin Adler.

A follow-up to r167197. Make RemoteCommandListener ctor public and use std::make_unique<>()
in both versions of RemoteCommandListener::create() functions (iOS and non-iOS).

  • platform/RemoteCommandListener.cpp:

(WebCore::RemoteCommandListener::create):

  • platform/RemoteCommandListener.h:

(WebCore::RemoteCommandListener::RemoteCommandListener):

  • platform/ios/RemoteCommandListenerIOS.mm:

(WebCore::RemoteCommandListener::create):

Location:
trunk/Source/WebCore
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r167589 r167590  
     12014-04-21  Zan Dobersek  <zdobersek@igalia.com>
     2
     3        iOS and non-iOS RemoteCommandListener::create() functions should use std::make_unique<>()
     4        https://bugs.webkit.org/show_bug.cgi?id=131916
     5
     6        Reviewed by Darin Adler.
     7
     8        A follow-up to r167197. Make RemoteCommandListener ctor public and use std::make_unique<>()
     9        in both versions of RemoteCommandListener::create() functions (iOS and non-iOS).
     10
     11        * platform/RemoteCommandListener.cpp:
     12        (WebCore::RemoteCommandListener::create):
     13        * platform/RemoteCommandListener.h:
     14        (WebCore::RemoteCommandListener::RemoteCommandListener):
     15        * platform/ios/RemoteCommandListenerIOS.mm:
     16        (WebCore::RemoteCommandListener::create):
     17
    1182014-04-21  Andreas Kling  <akling@apple.com>
    219
  • trunk/Source/WebCore/platform/RemoteCommandListener.cpp

    r167197 r167590  
    3232std::unique_ptr<RemoteCommandListener> RemoteCommandListener::create(RemoteCommandListenerClient& client)
    3333{
    34     return std::unique_ptr<RemoteCommandListener>(new RemoteCommandListener(client));
     34    return std::make_unique<RemoteCommandListener>(client);
    3535}
    3636#endif
  • trunk/Source/WebCore/platform/RemoteCommandListener.h

    r165676 r167590  
    4040public:
    4141    static std::unique_ptr<RemoteCommandListener> create(RemoteCommandListenerClient&);
     42    RemoteCommandListener(RemoteCommandListenerClient& client) : m_client(client) { }
    4243    virtual ~RemoteCommandListener() { }
    4344
    4445protected:
    45     RemoteCommandListener(RemoteCommandListenerClient& client) : m_client(client) { };
    46 
    4746    RemoteCommandListenerClient& m_client;
    4847};
  • trunk/Source/WebCore/platform/ios/RemoteCommandListenerIOS.mm

    r167196 r167590  
    4242std::unique_ptr<RemoteCommandListener> RemoteCommandListener::create(RemoteCommandListenerClient& client)
    4343{
    44     return std::unique_ptr<RemoteCommandListener>(new RemoteCommandListenerIOS(client));
     44    return std::make_unique<RemoteCommandListenerIOS>(client);
    4545}
    4646
Note: See TracChangeset for help on using the changeset viewer.