diff --git a/include/wx/webrequest.h b/include/wx/webrequest.h index 1cf1604e00..f1db691915 100644 --- a/include/wx/webrequest.h +++ b/include/wx/webrequest.h @@ -241,7 +241,8 @@ public: static wxWebSession* New(const wxString& backend = wxWebSessionBackendDefault); - static void RegisterFactory(const wxString& backend, wxSharedPtr factory); + static void RegisterFactory(const wxString& backend, + const wxSharedPtr& factory); static bool IsBackendAvailable(const wxString& backend); diff --git a/interface/wx/webrequest.h b/interface/wx/webrequest.h index 841c95bab7..94de7fad1f 100644 --- a/interface/wx/webrequest.h +++ b/interface/wx/webrequest.h @@ -544,7 +544,8 @@ public: @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. */ - static void RegisterFactory(const wxString& backend, wxSharedPtr factory); + static void RegisterFactory(const wxString& backend, + const wxSharedPtr& factory); /** Allows to check if the specified backend is available at runtime. diff --git a/src/common/webrequest.cpp b/src/common/webrequest.cpp index e4bb3d6171..165c29cf39 100644 --- a/src/common/webrequest.cpp +++ b/src/common/webrequest.cpp @@ -431,7 +431,9 @@ wxWebSession* wxWebSession::New(const wxString& backend) } // static -void wxWebSession::RegisterFactory(const wxString& backend, wxSharedPtr factory) +void +wxWebSession::RegisterFactory(const wxString& backend, + const wxSharedPtr& factory) { ms_factoryMap[backend] = factory; }