[Complex Text Layouts] Performance optimizations.

This commit is contained in:
bruvzg 2020-12-01 15:03:31 +02:00
parent a41f1c67e5
commit 0ef483e9a9
No known key found for this signature in database
GPG key ID: 009E1BFE42239B95
7 changed files with 211 additions and 124 deletions

View file

@ -56,11 +56,12 @@ ScriptIterator::ScriptIterator(const String &p_string, int p_start, int p_length
int paren_sp = -1;
int start_sp = paren_sp;
UErrorCode err = U_ZERO_ERROR;
const char32_t *str = p_string.ptr();
do {
script_code = USCRIPT_COMMON;
for (script_start = script_end; script_end < p_length; script_end++) {
UChar32 ch = p_string[script_end];
UChar32 ch = str[script_end];
UScriptCode sc = uscript_getScript(ch, &err);
if (U_FAILURE(err)) {
ERR_FAIL_MSG(u_errorName(err));