Codechange: use std::string_view for sq_getstring

This commit is contained in:
Rubidium
2025-05-02 18:46:50 +02:00
committed by rubidium42
parent f4f05dea33
commit 278aee2c19
12 changed files with 74 additions and 73 deletions
+3 -3
View File
@@ -110,9 +110,9 @@ namespace SQConvert {
/* Convert what-ever there is as parameter to a string */
sq_tostring(vm, index);
const SQChar *tmp;
sq_getstring(vm, -1, &tmp);
std::string result = StrMakeValid(tmp);
std::string_view view;
sq_getstring(vm, -1, view);
std::string result = StrMakeValid(view);
sq_poptop(vm);
return result;
}