1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-19 10:22:39 +01:00

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

@@ -462,7 +462,7 @@ NetworkRecvStatus ClientNetworkGameSocketHandler::SendQuit()
* @param pass The password for the remote command.
* @param command The actual command.
*/
NetworkRecvStatus ClientNetworkGameSocketHandler::SendRCon(const std::string &pass, const std::string &command)
NetworkRecvStatus ClientNetworkGameSocketHandler::SendRCon(std::string_view pass, std::string_view command)
{
Debug(net, 9, "Client::SendRCon()");
@@ -1212,7 +1212,7 @@ void NetworkClient_Connected()
* @param password The password.
* @param command The command to execute.
*/
void NetworkClientSendRcon(const std::string &password, const std::string &command)
void NetworkClientSendRcon(std::string_view password, std::string_view command)
{
MyClient::SendRCon(password, command);
}