Merge pull request #52598 from raulsntos/fix-52268

Fix autoloads iteration in `code_completion.cpp`
This commit is contained in:
Max Hilbrunner 2021-09-13 02:55:24 +02:00 committed by GitHub
commit cc0ab8fb2d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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)));
}
}