From 8b9f1147dfec4efe3451dd3e111276a1dab3bb99 Mon Sep 17 00:00:00 2001 From: rubidium42 Date: Sat, 29 May 2021 19:29:14 +0200 Subject: Codechange: [Network] Let server changing a client name use std::string --- src/network/network_func.h | 2 +- src/network/network_server.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/network') 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()) { -- cgit v1.2.3-70-g09d2