Codechange: use std::string_view for sending a remote console command (result)

This commit is contained in:
Rubidium
2025-04-20 11:33:25 +02:00
committed by rubidium42
parent d99edf2bbc
commit bb259b8e77
5 changed files with 8 additions and 8 deletions

View File

@@ -778,7 +778,7 @@ NetworkRecvStatus ServerNetworkGameSocketHandler::SendNewGame()
* @param colour The colour of the result.
* @param command The command that was executed.
*/
NetworkRecvStatus ServerNetworkGameSocketHandler::SendRConResult(uint16_t colour, const std::string &command)
NetworkRecvStatus ServerNetworkGameSocketHandler::SendRConResult(uint16_t colour, std::string_view command)
{
Debug(net, 9, "client[{}] SendRConResult()", this->client_id);
@@ -2018,7 +2018,7 @@ void NetworkServerDoMove(ClientID client_id, CompanyID company_id)
* @param colour_code The colour of the text.
* @param string The actual reply.
*/
void NetworkServerSendRcon(ClientID client_id, TextColour colour_code, const std::string &string)
void NetworkServerSendRcon(ClientID client_id, TextColour colour_code, std::string_view string)
{
NetworkClientSocket::GetByClientID(client_id)->SendRConResult(colour_code, string);
}