summaryrefslogtreecommitdiff
path: root/modules/text_server_adv/script_iterator.cpp
diff options
context:
space:
mode:
authorbruvzg <7645683+bruvzg@users.noreply.github.com>2020-12-01 15:03:31 +0200
committerbruvzg <7645683+bruvzg@users.noreply.github.com>2020-12-07 08:53:02 +0200
commit0ef483e9a940e8a2e236f923f1625a4aba77978a (patch)
treeb673eae966583ecf99ffc399b28cae3f82aad000 /modules/text_server_adv/script_iterator.cpp
parenta41f1c67e5d45e08f38d55af2d0680c2b5fb2446 (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.cpp3
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));