Codechange: use std::string_view for sq_pushstring

This commit is contained in:
Rubidium
2025-05-03 13:19:53 +02:00
committed by rubidium42
parent 3020e615a9
commit ec79ceb2be
17 changed files with 52 additions and 55 deletions

View File

@@ -649,7 +649,7 @@ bool ScriptInstance::IsPaused()
ScriptData *data;
bool operator()(const SQInteger &value) { sq_pushinteger(this->vm, value); return true; }
bool operator()(const std::string &value) { sq_pushstring(this->vm, value, -1); return true; }
bool operator()(const std::string &value) { sq_pushstring(this->vm, value); return true; }
bool operator()(const SQBool &value) { sq_pushbool(this->vm, value); return true; }
bool operator()(const SQSaveLoadType &type)
{
@@ -778,7 +778,7 @@ bool ScriptInstance::CallLoad()
/* Go to the instance-root */
sq_pushobject(vm, *this->instance);
/* Find the function-name inside the script */
sq_pushstring(vm, "Load", -1);
sq_pushstring(vm, "Load");
/* Change the "Load" string in a function pointer */
sq_get(vm, -2);
/* Push the main instance as "this" object */