Pass non-primitive types by const reference instead of value.
No real changes, just avoid the unnecessary copying and also make the signatures more consistent by adding the apparently forgotten "&" in a couple of places. See #15893. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75657 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -91,7 +91,7 @@ public:
|
||||
{ return DoPoke(item, ws,
|
||||
size == wxNO_LEN ? (wcslen(ws) + 1)*sizeof(wchar_t)
|
||||
: size, wxIPC_UNICODETEXT); }
|
||||
bool Poke(const wxString& item, const wxString s)
|
||||
bool Poke(const wxString& item, const wxString& s)
|
||||
{
|
||||
const wxScopedCharBuffer buf = s.utf8_str();
|
||||
return DoPoke(item, buf, strlen(buf) + 1, wxIPC_UTF8TEXT);
|
||||
@@ -113,7 +113,7 @@ public:
|
||||
{ return DoAdvise(item, ws,
|
||||
size == wxNO_LEN ? (wcslen(ws) + 1)*sizeof(wchar_t)
|
||||
: size, wxIPC_UNICODETEXT); }
|
||||
bool Advise(const wxString& item, const wxString s)
|
||||
bool Advise(const wxString& item, const wxString& s)
|
||||
{
|
||||
const wxScopedCharBuffer buf = s.utf8_str();
|
||||
return DoAdvise(item, buf, strlen(buf) + 1, wxIPC_UTF8TEXT);
|
||||
|
Reference in New Issue
Block a user