summaryrefslogtreecommitdiff
path: root/modules/gdscript/language_server/gdscript_text_document.cpp
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2021-09-30 23:52:46 +0200
committerGitHub <noreply@github.com>2021-09-30 23:52:46 +0200
commit77721b35ba21f2e7e8bb42cf415fccb018517843 (patch)
tree96b8f7532ae5d923b75bfbac8d6763015b6646bb /modules/gdscript/language_server/gdscript_text_document.cpp
parent3e1b6304613855cad56938e8a58848f09363a298 (diff)
parentc63b18507d21b8a213c073bced9057b571cdcd7a (diff)
Merge pull request #51409 from LightningAA/use-map-iterators
Use range iterators for `Map` in most cases
Diffstat (limited to 'modules/gdscript/language_server/gdscript_text_document.cpp')
-rw-r--r--modules/gdscript/language_server/gdscript_text_document.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/gdscript/language_server/gdscript_text_document.cpp b/modules/gdscript/language_server/gdscript_text_document.cpp
index 03b1e3fa44..d2e033d7de 100644
--- a/modules/gdscript/language_server/gdscript_text_document.cpp
+++ b/modules/gdscript/language_server/gdscript_text_document.cpp
@@ -217,8 +217,8 @@ Array GDScriptTextDocument::completion(const Dictionary &p_params) {
} else if (GDScriptLanguageProtocol::get_singleton()->is_smart_resolve_enabled()) {
arr = native_member_completions.duplicate();
- for (Map<String, ExtendGDScriptParser *>::Element *E = GDScriptLanguageProtocol::get_singleton()->get_workspace()->scripts.front(); E; E = E->next()) {
- ExtendGDScriptParser *script = E->get();
+ for (KeyValue<String, ExtendGDScriptParser *> &E : GDScriptLanguageProtocol::get_singleton()->get_workspace()->scripts) {
+ ExtendGDScriptParser *script = E.value;
const Array &items = script->get_member_completions();
const int start_size = arr.size();