mirror of https://github.com/BOINC/boinc.git
Use wxString instead of wxChar* where necessary
This eliminates compiler errors with wxUSE_STL=1. It's probably also a cleaner way to pass strings around.
This commit is contained in:
parent
960456627d
commit
b7cc65ae85
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
Loading…
Reference in New Issue