From 31f790299c1649680b48c00230e89318d864624f Mon Sep 17 00:00:00 2001 From: Lyuma Date: Thu, 26 Aug 2021 20:46:51 -0700 Subject: Use OrderedHashMap for autoloads to preserve order --- editor/plugins/script_editor_plugin.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'editor/plugins/script_editor_plugin.cpp') 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 autoloads = ProjectSettings::get_singleton()->get_autoload_list(); - for (Map::Element *E = autoloads.front(); E; E = E->next()) { - const ProjectSettings::AutoloadInfo &info = E->value(); + OrderedHashMap autoloads = ProjectSettings::get_singleton()->get_autoload_list(); + for (OrderedHashMap::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); } -- cgit v1.2.3