Codechange: Pass NewGRF strings as std::string_view instead of char *. (#12461)

This commit is contained in:
Peter Nelson
2024-04-09 08:40:27 +01:00
committed by GitHub
parent dc7c2bb30d
commit 54be756aae
4 changed files with 40 additions and 48 deletions

View File

@@ -163,7 +163,7 @@ const NetworkServerGameInfo &GetCurrentNetworkServerGameInfo()
* @param config The GRF to handle.
* @param name The name of the NewGRF, empty when unknown.
*/
static void HandleIncomingNetworkGameInfoGRFConfig(GRFConfig *config, std::string name)
static void HandleIncomingNetworkGameInfoGRFConfig(GRFConfig *config, std::string_view name)
{
/* Find the matching GRF file */
const GRFConfig *f = FindGRFConfig(config->ident.grfid, FGCM_EXACT, &config->ident.md5sum);