diff options
author | reduz <reduzio@gmail.com> | 2022-05-19 17:00:06 +0200 |
---|---|---|
committer | reduz <reduzio@gmail.com> | 2022-05-20 22:40:38 +0200 |
commit | 45af29da8095af16729955117a165d23e77cd740 (patch) | |
tree | 0436c59187702466a73d05caf9688a58e5935afd /modules/text_server_adv | |
parent | 410893ad0fb6f0d7d774b6529581d886defd6cf0 (diff) |
Add a new HashSet template
* Intended to replace RBSet in most cases.
* Optimized for iteration speed
Diffstat (limited to 'modules/text_server_adv')
-rw-r--r-- | modules/text_server_adv/text_server_adv.cpp | 2 | ||||
-rw-r--r-- | modules/text_server_adv/text_server_adv.h | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/modules/text_server_adv/text_server_adv.cpp b/modules/text_server_adv/text_server_adv.cpp index ef7807ca5d..0f45855a76 100644 --- a/modules/text_server_adv/text_server_adv.cpp +++ b/modules/text_server_adv/text_server_adv.cpp @@ -5589,7 +5589,7 @@ PackedInt32Array TextServerAdvanced::string_get_word_breaks(const String &p_stri // Convert to UTF-16. Char16String utf16 = p_string.utf16(); - RBSet<int> breaks; + HashSet<int> breaks; UErrorCode err = U_ZERO_ERROR; UBreakIterator *bi = ubrk_open(UBRK_LINE, p_language.ascii().get_data(), (const UChar *)utf16.ptr(), utf16.length(), &err); if (U_FAILURE(err)) { diff --git a/modules/text_server_adv/text_server_adv.h b/modules/text_server_adv/text_server_adv.h index 897c27b6fa..fe1d4bdcbf 100644 --- a/modules/text_server_adv/text_server_adv.h +++ b/modules/text_server_adv/text_server_adv.h @@ -126,7 +126,7 @@ class TextServerAdvanced : public TextServerExtension { _THREAD_SAFE_CLASS_ struct NumSystemData { - RBSet<StringName> lang; + HashSet<StringName> lang; String digits; String percent_sign; String exp; @@ -235,7 +235,7 @@ class TextServerAdvanced : public TextServerExtension { HashMap<Vector2i, FontDataForSizeAdvanced *, VariantHasher, VariantComparator> cache; bool face_init = false; - RBSet<uint32_t> supported_scripts; + HashSet<uint32_t> supported_scripts; Dictionary supported_features; Dictionary supported_varaitions; Dictionary feature_overrides; |