1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-07 12:30:27 +00:00

[Complex Test Layouts] Change String to use UTF-32 encoding on all platforms.

This commit is contained in:
bruvzg
2020-07-27 13:43:20 +03:00
parent 0864f12f0d
commit 80b8eff6aa
94 changed files with 4889 additions and 1686 deletions

View File

@@ -61,7 +61,7 @@ String StringBuilder::as_string() const {
return "";
}
CharType *buffer = memnew_arr(CharType, string_length);
char32_t *buffer = memnew_arr(char32_t, string_length);
int current_position = 0;
@@ -73,7 +73,7 @@ String StringBuilder::as_string() const {
// Godot string
const String &s = strings[godot_string_elem];
memcpy(buffer + current_position, s.ptr(), s.length() * sizeof(CharType));
memcpy(buffer + current_position, s.ptr(), s.length() * sizeof(char32_t));
current_position += s.length();