mirror of
https://github.com/OpenTTD/OpenTTD
synced 2026-01-18 09:52:44 +01:00
Codechange: use std::string_view over std::string for NetworkTextMessage
This commit is contained in:
@@ -230,7 +230,7 @@ uint8_t NetworkSpectatorCount()
|
||||
/* 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 std::string &name, const std::string &str, StringParameter &&data)
|
||||
void NetworkTextMessage(NetworkAction action, TextColour colour, bool self_send, std::string_view name, std::string_view str, StringParameter &&data)
|
||||
{
|
||||
std::string message;
|
||||
StringBuilder builder(message);
|
||||
|
||||
Reference in New Issue
Block a user