mirror of
https://github.com/godotengine/godot.git
synced 2025-10-23 09:53:25 +00:00
Replace append_utfx with direct String::utfx
This commit is contained in:
parent
ba3482926d
commit
23129a66ed
30 changed files with 49 additions and 123 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue