diff options
author | Moonchild <moonchild@palemoon.org> | 2021-12-08 16:11:01 +0000 |
---|---|---|
committer | Moonchild <moonchild@palemoon.org> | 2022-04-07 23:48:24 +0200 |
commit | d61076d50e400e98d60a4168279ef05b6e479422 (patch) | |
tree | f6acf27e55d49afa7fca5da158ab2bd2d6dc4f5d /intl | |
parent | 43bed4dad8db4c59da57e60ae0d5376f639dd6e8 (diff) | |
download | uxp-d61076d50e400e98d60a4168279ef05b6e479422.tar.gz |
No issue - Minor performance improvement in BidiUtils
Diffstat (limited to 'intl')
-rw-r--r-- | intl/unicharutil/util/nsBidiUtils.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/intl/unicharutil/util/nsBidiUtils.cpp b/intl/unicharutil/util/nsBidiUtils.cpp index 8c186ac685..bc983d4092 100644 --- a/intl/unicharutil/util/nsBidiUtils.cpp +++ b/intl/unicharutil/util/nsBidiUtils.cpp @@ -91,6 +91,11 @@ bool HasRTLChars(const nsAString& aString) int32_t length = aString.Length(); for (int32_t i = 0; i < length; i++) { char16_t ch = aString.CharAt(i); + if (ch < 0x0590) { + // Characters below this value are never RTL, so take a quick exit + // out of this iteration of the loop. + continue; + } if (ch >= 0xD800 || IS_IN_BMP_RTL_BLOCK(ch)) { return true; } |