Codechange: replace 'const char *' script API parameters with std::string

This commit is contained in:
Rubidium
2023-05-06 10:07:54 +02:00
committed by rubidium42
parent b1b578f988
commit d9e93edc8b
13 changed files with 20 additions and 35 deletions

View File

@@ -42,7 +42,7 @@ macro(dump_class_templates NAME)
string(APPEND SQUIRREL_EXPORT "\n return Param<ScriptText *>::Get(vm, index, ptr);")
string(APPEND SQUIRREL_EXPORT "\n }")
string(APPEND SQUIRREL_EXPORT "\n if (sq_gettype(vm, index) == OT_STRING) {")
string(APPEND SQUIRREL_EXPORT "\n return new RawText(Param<const char *>::Get(vm, index, ptr));")
string(APPEND SQUIRREL_EXPORT "\n return new RawText(Param<const std::string &>::Get(vm, index, ptr));")
string(APPEND SQUIRREL_EXPORT "\n }")
string(APPEND SQUIRREL_EXPORT "\n return nullptr;")
string(APPEND SQUIRREL_EXPORT "\n }")