summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRaul Santos <raulsntos@gmail.com>2021-09-03 18:51:19 +0200
committerRaul Santos <raulsntos@gmail.com>2021-09-12 13:22:18 +0200
commit2962a440eae2c76438eb1224a7625b092ea7cbef (patch)
tree01fcf2ffd234c8d6ddc816f9893b6ca0d169d546
parent5f69218edc4f4af574c7a65f077e2e0bf1f28365 (diff)
Fix autoloads iteration
Removes the range iterator usage in the autoloads map since `OrderedHashMap` does not implement range iterators.
-rw-r--r--modules/mono/editor/code_completion.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/mono/editor/code_completion.cpp b/modules/mono/editor/code_completion.cpp
index d911f6461c..7433c865f5 100644
--- a/modules/mono/editor/code_completion.cpp
+++ b/modules/mono/editor/code_completion.cpp
@@ -123,8 +123,8 @@ PackedStringArray get_code_completion(CompletionKind p_kind, const String &p_scr
// AutoLoads
OrderedHashMap<StringName, ProjectSettings::AutoloadInfo> autoloads = ProjectSettings::get_singleton()->get_autoload_list();
- for (const KeyValue<StringName, ProjectSettings::AutoloadInfo> &E : autoloads) {
- const ProjectSettings::AutoloadInfo &info = E.value;
+ for (OrderedHashMap<StringName, ProjectSettings::AutoloadInfo>::Element E = autoloads.front(); E; E = E.next()) {
+ const ProjectSettings::AutoloadInfo &info = E.value();
suggestions.push_back(quoted("/root/" + String(info.name)));
}
}