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

This commit is contained in:
bruvzg committed 2020-09-03 19:56:24 +03:00
1 parent 0864f12f0d
commit 80b8eff6aa
94 files changed
+4889 -1686

No files matched your search

+2 -2
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();