summaryrefslogtreecommitdiff
path: root/src/network
diff options
context:
space:
mode:
authorrubidium42 <rubidium@openttd.org>2021-05-29 19:29:14 +0200
committerrubidium42 <rubidium42@users.noreply.github.com>2021-05-30 00:01:49 +0200
commit8b9f1147dfec4efe3451dd3e111276a1dab3bb99 (patch)
tree6fc3a64443fdc40fd5ef94b69cad60fc6f075d6b /src/network
parentd70fb74ac669bdb64b5f594894629ec91801fd76 (diff)
downloadopenttd-8b9f1147dfec4efe3451dd3e111276a1dab3bb99.tar.xz
Codechange: [Network] Let server changing a client name use std::string
Diffstat (limited to 'src/network')
-rw-r--r--src/network/network_func.h2
-rw-r--r--src/network/network_server.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/network/network_func.h b/src/network/network_func.h
index d30616fd0..a50166e2a 100644
--- a/src/network/network_func.h
+++ b/src/network/network_func.h
@@ -73,7 +73,7 @@ void NetworkServerUpdateGameInfo();
void NetworkServerShowStatusToConsole();
bool NetworkServerStart();
void NetworkServerNewCompany(const Company *company, NetworkClientInfo *ci);
-bool NetworkServerChangeClientName(ClientID client_id, const char *new_name);
+bool NetworkServerChangeClientName(ClientID client_id, const std::string &new_name);
void NetworkServerDoMove(ClientID client_id, CompanyID company_id);
diff --git a/src/network/network_server.cpp b/src/network/network_server.cpp
index fe585c03c..b770dbda3 100644
--- a/src/network/network_server.cpp
+++ b/src/network/network_server.cpp
@@ -1719,7 +1719,7 @@ bool NetworkFindName(char *new_name, const char *last)
* @param new_name the new name for the client
* @return true iff the name was changed
*/
-bool NetworkServerChangeClientName(ClientID client_id, const char *new_name)
+bool NetworkServerChangeClientName(ClientID client_id, const std::string &new_name)
{
/* Check if the name's already in use */
for (NetworkClientInfo *ci : NetworkClientInfo::Iterate()) {