1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-05 12:10:55 +00:00

Merge pull request #104556 from Ivorforce/string-extend-instead-of-parse

Use `append_` instead of `parse_` for `String` methods.
This commit is contained in:
Thaddeus Crews
2025-03-29 10:16:33 -05:00
62 changed files with 245 additions and 274 deletions

View File

@@ -67,7 +67,7 @@ Error DAPeer::handle_data() {
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.parse_utf8(r);
header.append_utf8(r);
content_length = header.substr(16).to_int();
has_header = true;
req_pos = 0;
@@ -94,7 +94,7 @@ Error DAPeer::handle_data() {
// Parse data
String msg;
msg.parse_utf8((const char *)req_buf, req_pos);
msg.append_utf8((const char *)req_buf, req_pos);
// Apply a timestamp if it there's none yet
if (!timestamp) {