1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-16 00:42:45 +01:00

Codechange: use std::string_view for scripts

This commit is contained in:
Rubidium
2025-04-26 21:10:08 +02:00
committed by rubidium42
parent 864fe29028
commit b9667ec3d1
17 changed files with 77 additions and 78 deletions

View File

@@ -46,10 +46,10 @@ static void PrintFunc(bool error_msg, const std::string &message)
ScriptController::Print(error_msg, message);
}
ScriptInstance::ScriptInstance(const char *APIName)
ScriptInstance::ScriptInstance(std::string_view api_name)
{
this->storage = new ScriptStorage();
this->engine = new Squirrel(APIName);
this->engine = new Squirrel(api_name);
this->engine->SetPrintFunction(&PrintFunc);
}