mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-08-16 02:59:10 +00:00
Codechange: remove a number of unneeded c_str() calls
This commit is contained in:
@@ -480,7 +480,7 @@ public:
|
||||
this->FinishInitNested(WN_NETWORK_WINDOW_GAME);
|
||||
|
||||
this->querystrings[WID_NG_CLIENT] = &this->name_editbox;
|
||||
this->name_editbox.text.Assign(_settings_client.network.client_name.c_str());
|
||||
this->name_editbox.text.Assign(_settings_client.network.client_name);
|
||||
|
||||
this->querystrings[WID_NG_FILTER] = &this->filter_editbox;
|
||||
this->filter_editbox.cancel_button = QueryString::ACTION_CLEAR;
|
||||
@@ -1036,7 +1036,7 @@ struct NetworkStartServerWindow : public Window {
|
||||
this->InitNested(WN_NETWORK_WINDOW_START);
|
||||
|
||||
this->querystrings[WID_NSS_GAMENAME] = &this->name_editbox;
|
||||
this->name_editbox.text.Assign(_settings_client.network.server_name.c_str());
|
||||
this->name_editbox.text.Assign(_settings_client.network.server_name);
|
||||
|
||||
this->SetFocusedWidget(WID_NSS_GAMENAME);
|
||||
}
|
||||
|
@@ -1874,7 +1874,7 @@ void NetworkServerShowStatusToConsole()
|
||||
|
||||
status = (cs->status < (ptrdiff_t)lengthof(stat_str) ? stat_str[cs->status] : "unknown");
|
||||
IConsolePrint(CC_INFO, "Client #{} name: '{}' status: '{}' frame-lag: {} company: {} IP: {}",
|
||||
cs->client_id, ci->client_name.c_str(), status, lag,
|
||||
cs->client_id, ci->client_name, status, lag,
|
||||
ci->client_playas + (Company::IsValidID(ci->client_playas) ? 1 : 0),
|
||||
cs->GetClientIP());
|
||||
}
|
||||
|
Reference in New Issue
Block a user