diff options
author | bruvzg <7645683+bruvzg@users.noreply.github.com> | 2020-12-01 15:03:31 +0200 |
---|---|---|
committer | bruvzg <7645683+bruvzg@users.noreply.github.com> | 2020-12-07 08:53:02 +0200 |
commit | 0ef483e9a940e8a2e236f923f1625a4aba77978a (patch) | |
tree | b673eae966583ecf99ffc399b28cae3f82aad000 /modules/text_server_adv/script_iterator.cpp | |
parent | a41f1c67e5d45e08f38d55af2d0680c2b5fb2446 (diff) |
[Complex Text Layouts] Performance optimizations.
Diffstat (limited to 'modules/text_server_adv/script_iterator.cpp')
-rw-r--r-- | modules/text_server_adv/script_iterator.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/text_server_adv/script_iterator.cpp b/modules/text_server_adv/script_iterator.cpp index 8a2b2cced0..60a617c3a7 100644 --- a/modules/text_server_adv/script_iterator.cpp +++ b/modules/text_server_adv/script_iterator.cpp @@ -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)); |