Use append_ instead of parse_ for String methods.

This commit is contained in:
Lukas Tenbrink 2025-03-24 12:25:48 +01:00
parent 594d64ec24
commit ffa6ef220b
62 changed files with 245 additions and 274 deletions

View file

@ -93,7 +93,7 @@ String cwd() {
}
String result;
result.parse_utf16(buffer.ptr());
result.append_utf16(buffer.ptr());
if (result.is_empty()) {
return ".";
}
@ -105,7 +105,7 @@ String cwd() {
}
String result;
if (result.parse_utf8(buffer) != OK) {
if (result.append_utf8(buffer) != OK) {
return ".";
}
@ -146,7 +146,7 @@ String realpath(const String &p_path) {
::CloseHandle(hFile);
String result;
result.parse_utf16(buffer.ptr());
result.append_utf16(buffer.ptr());
if (result.is_empty()) {
return p_path;
}
@ -160,7 +160,7 @@ String realpath(const String &p_path) {
}
String result;
Error parse_ok = result.parse_utf8(resolved_path);
Error parse_ok = result.append_utf8(resolved_path);
::free(resolved_path);
if (parse_ok != OK) {