Pass wxSharedPtr argument of RegisterFactory() by const reference
Avoid extra copies from passing it by value.
This commit is contained in:
@@ -241,7 +241,8 @@ public:
|
|||||||
|
|
||||||
static wxWebSession* New(const wxString& backend = wxWebSessionBackendDefault);
|
static wxWebSession* New(const wxString& backend = wxWebSessionBackendDefault);
|
||||||
|
|
||||||
static void RegisterFactory(const wxString& backend, wxSharedPtr<wxWebSessionFactory> factory);
|
static void RegisterFactory(const wxString& backend,
|
||||||
|
const wxSharedPtr<wxWebSessionFactory>& factory);
|
||||||
|
|
||||||
static bool IsBackendAvailable(const wxString& backend);
|
static bool IsBackendAvailable(const wxString& backend);
|
||||||
|
|
||||||
|
@@ -544,7 +544,8 @@ public:
|
|||||||
@param backend The name for the new backend to be registered under
|
@param backend The name for the new backend to be registered under
|
||||||
@param factory A shared pointer to the factory which creates the appropriate backend.
|
@param factory A shared pointer to the factory which creates the appropriate backend.
|
||||||
*/
|
*/
|
||||||
static void RegisterFactory(const wxString& backend, wxSharedPtr<wxWebSessionFactory> factory);
|
static void RegisterFactory(const wxString& backend,
|
||||||
|
const wxSharedPtr<wxWebSessionFactory>& factory);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Allows to check if the specified backend is available at runtime.
|
Allows to check if the specified backend is available at runtime.
|
||||||
|
@@ -431,7 +431,9 @@ wxWebSession* wxWebSession::New(const wxString& backend)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// static
|
// static
|
||||||
void wxWebSession::RegisterFactory(const wxString& backend, wxSharedPtr<wxWebSessionFactory> factory)
|
void
|
||||||
|
wxWebSession::RegisterFactory(const wxString& backend,
|
||||||
|
const wxSharedPtr<wxWebSessionFactory>& factory)
|
||||||
{
|
{
|
||||||
ms_factoryMap[backend] = factory;
|
ms_factoryMap[backend] = factory;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user