mirror of
https://github.com/OpenTTD/OpenTTD
synced 2026-01-28 06:34:33 +01:00
Codechange: use std::string_view for sending chat messages
This commit is contained in:
@@ -401,7 +401,7 @@ NetworkRecvStatus ClientNetworkGameSocketHandler::SendCommand(const CommandPacke
|
||||
}
|
||||
|
||||
/** Send a chat-packet over the network */
|
||||
NetworkRecvStatus ClientNetworkGameSocketHandler::SendChat(NetworkAction action, DestType type, int dest, const std::string &msg, int64_t data)
|
||||
NetworkRecvStatus ClientNetworkGameSocketHandler::SendChat(NetworkAction action, DestType type, int dest, std::string_view msg, int64_t data)
|
||||
{
|
||||
Debug(net, 9, "Client::SendChat(): action={}, type={}, dest={}", action, type, dest);
|
||||
|
||||
@@ -1328,7 +1328,7 @@ void NetworkUpdateClientName(const std::string &client_name)
|
||||
* @param msg The actual message.
|
||||
* @param data Arbitrary extra data.
|
||||
*/
|
||||
void NetworkClientSendChat(NetworkAction action, DestType type, int dest, const std::string &msg, int64_t data)
|
||||
void NetworkClientSendChat(NetworkAction action, DestType type, int dest, std::string_view msg, int64_t data)
|
||||
{
|
||||
MyClient::SendChat(action, type, dest, msg, data);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user