diff options
author | rubidium42 <rubidium@openttd.org> | 2021-05-02 09:10:09 +0200 |
---|---|---|
committer | rubidium42 <rubidium42@users.noreply.github.com> | 2021-05-14 23:22:04 +0200 |
commit | 6db52d52d00516b71a982e61b3b9592a887091aa (patch) | |
tree | 0125b75c92e42e189ddce0cf347d51edad41706a /src/network/network_client.h | |
parent | 1de5cdeab8387b23b566142f205ac9232a6f61a3 (diff) | |
download | openttd-6db52d52d00516b71a982e61b3b9592a887091aa.tar.xz |
Codechange: [Network] Use std::string for the internal handling of server passwords
Diffstat (limited to 'src/network/network_client.h')
-rw-r--r-- | src/network/network_client.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/network/network_client.h b/src/network/network_client.h index c4dc4b1fd..baf4f5996 100644 --- a/src/network/network_client.h +++ b/src/network/network_client.h @@ -90,7 +90,7 @@ public: static NetworkRecvStatus SendQuit(); static NetworkRecvStatus SendAck(); - static NetworkRecvStatus SendGamePassword(const char *password); + static NetworkRecvStatus SendGamePassword(const std::string &password); static NetworkRecvStatus SendCompanyPassword(const std::string &password); static NetworkRecvStatus SendChat(NetworkAction action, DestType type, int dest, const char *msg, int64 data); @@ -114,10 +114,10 @@ void NetworkClientSetCompanyPassword(const std::string &password); /** Information required to join a server. */ struct NetworkJoinInfo { - NetworkJoinInfo() : company(COMPANY_SPECTATOR), server_password(nullptr) {} + NetworkJoinInfo() : company(COMPANY_SPECTATOR) {} std::string connection_string; ///< The address of the server to join. CompanyID company; ///< The company to join. - const char *server_password; ///< The password of the server to join. + std::string server_password; ///< The password of the server to join. std::string company_password; ///< The password of the company to join. }; |