diff --git a/clientgui/BOINCBaseView.cpp b/clientgui/BOINCBaseView.cpp index 0c641592ca..4337afccba 100644 --- a/clientgui/BOINCBaseView.cpp +++ b/clientgui/BOINCBaseView.cpp @@ -913,11 +913,11 @@ void CBOINCBaseView::AppendColumn(int){ } -void CBOINCBaseView::append_to_status(wxString& existing, const wxChar* additional) { +void CBOINCBaseView::append_to_status(wxString& existing, const wxString& additional) { if (existing.size() == 0) { existing = additional; } else { - existing = existing + wxT(", ") + additional; + existing += wxT(", ") + additional; } } diff --git a/clientgui/BOINCBaseView.h b/clientgui/BOINCBaseView.h index 811fecbb1d..c7b4fb93fe 100644 --- a/clientgui/BOINCBaseView.h +++ b/clientgui/BOINCBaseView.h @@ -193,7 +193,7 @@ protected: bool _EnsureLastItemVisible(); virtual bool EnsureLastItemVisible(); - static void append_to_status(wxString& existing, const wxChar* additional); + static void append_to_status(wxString& existing, const wxString& additional); static wxString HtmlEntityEncode(wxString strRaw); static wxString HtmlEntityDecode(wxString strRaw); diff --git a/clientgui/MainDocument.cpp b/clientgui/MainDocument.cpp index 0c94e5e792..7070807488 100644 --- a/clientgui/MainDocument.cpp +++ b/clientgui/MainDocument.cpp @@ -274,7 +274,7 @@ bool CNetworkConnection::IsComputerNameLocal(const wxString& strMachine) { int CNetworkConnection::SetComputer( - const wxChar* szComputer, const int iPort, const wxChar* szPassword, + const wxString& szComputer, const int iPort, const wxString& szPassword, const bool bUseDefaultPassword ) { m_strNewComputerName.Empty(); @@ -642,7 +642,7 @@ int CMainDocument::ResetState() { } -int CMainDocument::Connect(const wxChar* szComputer, int iPort, const wxChar* szComputerPassword, const bool bDisconnect, const bool bUseDefaultPassword) { +int CMainDocument::Connect(const wxString& szComputer, int iPort, const wxString& szComputerPassword, const bool bDisconnect, const bool bUseDefaultPassword) { if (IsComputerNameLocal(szComputer)) { // Restart client if not already running m_pClientManager->AutoRestart(); @@ -688,7 +688,7 @@ int CMainDocument::GetConnectingComputerName(wxString& strMachine) { } -bool CMainDocument::IsComputerNameLocal(const wxString strMachine) { +bool CMainDocument::IsComputerNameLocal(const wxString& strMachine) { return m_pNetworkConnection->IsComputerNameLocal(strMachine); } diff --git a/clientgui/MainDocument.h b/clientgui/MainDocument.h index 3b885718a9..90c10b5d9d 100644 --- a/clientgui/MainDocument.h +++ b/clientgui/MainDocument.h @@ -75,8 +75,7 @@ public: bool IsComputerNameLocal(const wxString& strMachine); int GetLocalPassword(wxString& strPassword); int SetComputer( - const wxChar* szComputer, const int iPort, const wxChar* szPassword, - const bool bUseDefaultPassword + const wxString& szComputer, const int iPort, const wxString& szPassword, const bool bUseDefaultPassword ); void SetStateError(); void SetStateErrorAuthentication(); @@ -134,9 +133,9 @@ public: int ResetState(); int Connect( - const wxChar* szComputer, + const wxString& szComputer, const int iPort, - const wxChar* szComputerPassword = wxEmptyString, + const wxString& szComputerPassword = wxEmptyString, const bool bDisconnect = FALSE, const bool bUseDefaultPassword = FALSE ); @@ -152,7 +151,7 @@ public: int GetConnectedComputerName(wxString& strMachine); int GetConnectedComputerVersion(wxString& strVersion); int GetConnectingComputerName(wxString& strMachine); - bool IsComputerNameLocal(const wxString strMachine); + bool IsComputerNameLocal(const wxString& strMachine); bool IsConnected(); bool IsReconnecting();