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 /modules/gdscript/editor | |
parent | 6e87d628735cb201cb3de49a723baaf60d9c942d (diff) |
Use OrderedHashMap for autoloads to preserve order
Diffstat (limited to 'modules/gdscript/editor')
-rw-r--r-- | modules/gdscript/editor/gdscript_highlighter.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/gdscript/editor/gdscript_highlighter.cpp b/modules/gdscript/editor/gdscript_highlighter.cpp index 8b9bd2659d..ab441d194a 100644 --- a/modules/gdscript/editor/gdscript_highlighter.cpp +++ b/modules/gdscript/editor/gdscript_highlighter.cpp @@ -471,9 +471,9 @@ void GDScriptSyntaxHighlighter::_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) { keywords[info.name] = usertype_color; } |