diff options
author | Lyuma <xn.lyuma@gmail.com> | 2021-08-26 20:46:51 -0700 |
---|---|---|
committer | Lyuma <xn.lyuma@gmail.com> | 2021-08-26 21:55:26 -0700 |
commit | 31f790299c1649680b48c00230e89318d864624f (patch) | |
tree | 08217b561017e7150910769240ac7fb5b82eea91 /editor/plugins/script_editor_plugin.cpp | |
parent | 6e87d628735cb201cb3de49a723baaf60d9c942d (diff) |
Use OrderedHashMap for autoloads to preserve order
Diffstat (limited to 'editor/plugins/script_editor_plugin.cpp')
-rw-r--r-- | editor/plugins/script_editor_plugin.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp index 3d2b3f4478..a24249b95b 100644 --- a/editor/plugins/script_editor_plugin.cpp +++ b/editor/plugins/script_editor_plugin.cpp @@ -115,9 +115,9 @@ void EditorStandardSyntaxHighlighter::_update_cache() { } /* Autoloads. */ - Map<StringName, ProjectSettings::AutoloadInfo> autoloads = ProjectSettings::get_singleton()->get_autoload_list(); - for (Map<StringName, ProjectSettings::AutoloadInfo>::Element *E = autoloads.front(); E; E = E->next()) { - const ProjectSettings::AutoloadInfo &info = E->value(); + OrderedHashMap<StringName, ProjectSettings::AutoloadInfo> autoloads = ProjectSettings::get_singleton()->get_autoload_list(); + for (OrderedHashMap<StringName, ProjectSettings::AutoloadInfo>::Element E = autoloads.front(); E; E = E.next()) { + const ProjectSettings::AutoloadInfo &info = E.value(); if (info.is_singleton) { highlighter->add_keyword_color(info.name, usertype_color); } |