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
+1 -1
View File
@@ -1043,7 +1043,7 @@ static void SlStdString(void *ptr, VarType conv)
case SLA_SAVE: {
size_t len = str->length();
SlWriteArrayLength(len);
SlCopyBytes(const_cast<void *>(static_cast<const void *>(str->c_str())), len);
SlCopyBytes(const_cast<void *>(static_cast<const void *>(str->data())), len);
break;
}