diff options
author | rubidium42 <rubidium@openttd.org> | 2021-05-14 18:12:37 +0200 |
---|---|---|
committer | rubidium42 <rubidium42@users.noreply.github.com> | 2021-05-15 10:20:50 +0200 |
commit | e6703eac6853851f310923760b194ee4c875251b (patch) | |
tree | 57efb2579076de6bd1d15fc7b0b56f956122ef64 /src/network/network.cpp | |
parent | 44ca7d93773fb816da6d353c9cde6ab14dae993a (diff) | |
download | openttd-e6703eac6853851f310923760b194ee4c875251b.tar.xz |
Codechange: [Network] Let NetworkTextMessage use std::string
Diffstat (limited to 'src/network/network.cpp')
-rw-r--r-- | src/network/network.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/network/network.cpp b/src/network/network.cpp index 2c5390dc0..abc8bdbc0 100644 --- a/src/network/network.cpp +++ b/src/network/network.cpp @@ -214,7 +214,7 @@ bool NetworkCompanyIsPassworded(CompanyID company_id) /* This puts a text-message to the console, or in the future, the chat-box, * (to keep it all a bit more general) * If 'self_send' is true, this is the client who is sending the message */ -void NetworkTextMessage(NetworkAction action, TextColour colour, bool self_send, const char *name, const char *str, int64 data) +void NetworkTextMessage(NetworkAction action, TextColour colour, bool self_send, const std::string &name, const std::string &str, int64 data) { StringID strid; switch (action) { @@ -369,7 +369,7 @@ void NetworkHandlePauseChange(PauseMode prev_mode, PauseMode changed_mode) char buffer[DRAW_STRING_BUFFER]; GetString(buffer, str, lastof(buffer)); - NetworkTextMessage(NETWORK_ACTION_SERVER_MESSAGE, CC_DEFAULT, false, nullptr, buffer); + NetworkTextMessage(NETWORK_ACTION_SERVER_MESSAGE, CC_DEFAULT, false, "", buffer); break; } |