diff options
| author | Lightning_A <aaronjrecord@gmail.com> | 2021-08-09 14:13:42 -0600 |
|---|---|---|
| committer | Lightning_A <aaronjrecord@gmail.com> | 2021-09-30 15:09:12 -0600 |
| commit | c63b18507d21b8a213c073bced9057b571cdcd7a (patch) | |
| tree | 96b8f7532ae5d923b75bfbac8d6763015b6646bb /core/string/optimized_translation.cpp | |
| parent | e4dfa69bcf58e4d50acdde32c590364e43fce3ab (diff) | |
| download | redot-engine-c63b18507d21b8a213c073bced9057b571cdcd7a.tar.gz | |
Use range iterators for `Map`
Diffstat (limited to 'core/string/optimized_translation.cpp')
| -rw-r--r-- | core/string/optimized_translation.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/core/string/optimized_translation.cpp b/core/string/optimized_translation.cpp index 5863bd1c46..839b7a9c01 100644 --- a/core/string/optimized_translation.cpp +++ b/core/string/optimized_translation.cpp @@ -162,11 +162,11 @@ void OptimizedTranslation::generate(const Ref<Translation> &p_from) { btw[btindex++] = t.size(); btw[btindex++] = hfunc_table[i]; - for (Map<uint32_t, int>::Element *E = t.front(); E; E = E->next()) { - btw[btindex++] = E->key(); - btw[btindex++] = compressed[E->get()].offset; - btw[btindex++] = compressed[E->get()].compressed.size(); - btw[btindex++] = compressed[E->get()].orig_len; + for (const KeyValue<uint32_t, int> &E : t) { + btw[btindex++] = E.key; + btw[btindex++] = compressed[E.value].offset; + btw[btindex++] = compressed[E.value].compressed.size(); + btw[btindex++] = compressed[E.value].orig_len; } } |
