Replace append_utfx with direct String::utfx

This commit is contained in:
Kiro 2025-03-30 19:56:38 +02:00
parent ba3482926d
commit 23129a66ed
30 changed files with 49 additions and 123 deletions

View file

@ -60,8 +60,7 @@ Error GDScriptLanguageProtocol::LSPeer::handle_data() {
// End of headers
if (l > 3 && r[l] == '\n' && r[l - 1] == '\r' && r[l - 2] == '\n' && r[l - 3] == '\r') {
r[l - 3] = '\0'; // Null terminate to read string
String header;
header.append_utf8(r);
String header = String::utf8(r);
content_length = header.substr(16).to_int();
has_header = true;
req_pos = 0;
@ -87,8 +86,7 @@ Error GDScriptLanguageProtocol::LSPeer::handle_data() {
}
// Parse data
String msg;
msg.append_utf8((const char *)req_buf, req_pos);
String msg = String::utf8((const char *)req_buf, req_pos);
// Reset to read again
req_pos = 0;