Codechange: Use data() instead of c_str(), if no NUL termination is needed.

This commit is contained in:
frosch
2025-04-30 12:39:38 +02:00
committed by frosch
parent 9e90d4ed79
commit 9cf36dac39
8 changed files with 12 additions and 12 deletions

View File

@@ -64,7 +64,7 @@ static std::optional<std::string> TestScriptAdminMakeJSON(std::string_view squir
sq_pop(vm, 1);
/* Compile the snippet. */
REQUIRE(sq_compilebuffer(vm, buffer.c_str(), buffer.size(), "test", SQTrue) == SQ_OK);
REQUIRE(sq_compilebuffer(vm, buffer.data(), buffer.size(), "test", SQTrue) == SQ_OK);
/* Execute the snippet, capturing the return value. */
sq_pushroottable(vm);
REQUIRE(sq_call(vm, 1, SQTrue, SQTrue) == SQ_OK);