diff options
| author | Rémi Verschelde <rverschelde@gmail.com> | 2021-07-24 15:46:25 +0200 |
|---|---|---|
| committer | Rémi Verschelde <rverschelde@gmail.com> | 2021-07-25 12:22:25 +0200 |
| commit | ac3322b0af8f23e8e2dac8111200bc69b5604c9f (patch) | |
| tree | 59a079f13b5c03c2dd3328a26c55f3618e6014f6 /modules/mono/editor/code_completion.cpp | |
| parent | a0f7f42b842462646281f5c4c9a8db070e034adc (diff) | |
| download | redot-engine-ac3322b0af8f23e8e2dac8111200bc69b5604c9f.tar.gz | |
Use const references where possible for List range iterators
Diffstat (limited to 'modules/mono/editor/code_completion.cpp')
| -rw-r--r-- | modules/mono/editor/code_completion.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/modules/mono/editor/code_completion.cpp b/modules/mono/editor/code_completion.cpp index 308c15e7c9..fa7d418844 100644 --- a/modules/mono/editor/code_completion.cpp +++ b/modules/mono/editor/code_completion.cpp @@ -109,7 +109,7 @@ PackedStringArray get_code_completion(CompletionKind p_kind, const String &p_scr List<PropertyInfo> project_props; ProjectSettings::get_singleton()->get_property_list(&project_props); - for (PropertyInfo &prop : project_props) { + for (const PropertyInfo &prop : project_props) { if (!prop.name.begins_with("input/")) { continue; } @@ -185,7 +185,7 @@ PackedStringArray get_code_completion(CompletionKind p_kind, const String &p_scr ClassDB::get_signal_list(native, &signals, /* p_no_inheritance: */ false); } - for (MethodInfo &E : signals) { + for (const MethodInfo &E : signals) { const String &signal = E.name; suggestions.push_back(quoted(signal)); } @@ -197,7 +197,7 @@ PackedStringArray get_code_completion(CompletionKind p_kind, const String &p_scr List<StringName> sn; Theme::get_default()->get_color_list(base->get_class(), &sn); - for (StringName &E : sn) { + for (const StringName &E : sn) { suggestions.push_back(quoted(E)); } } @@ -209,7 +209,7 @@ PackedStringArray get_code_completion(CompletionKind p_kind, const String &p_scr List<StringName> sn; Theme::get_default()->get_constant_list(base->get_class(), &sn); - for (StringName &E : sn) { + for (const StringName &E : sn) { suggestions.push_back(quoted(E)); } } @@ -221,7 +221,7 @@ PackedStringArray get_code_completion(CompletionKind p_kind, const String &p_scr List<StringName> sn; Theme::get_default()->get_font_list(base->get_class(), &sn); - for (StringName &E : sn) { + for (const StringName &E : sn) { suggestions.push_back(quoted(E)); } } @@ -233,7 +233,7 @@ PackedStringArray get_code_completion(CompletionKind p_kind, const String &p_scr List<StringName> sn; Theme::get_default()->get_font_size_list(base->get_class(), &sn); - for (StringName &E : sn) { + for (const StringName &E : sn) { suggestions.push_back(quoted(E)); } } @@ -245,7 +245,7 @@ PackedStringArray get_code_completion(CompletionKind p_kind, const String &p_scr List<StringName> sn; Theme::get_default()->get_stylebox_list(base->get_class(), &sn); - for (StringName &E : sn) { + for (const StringName &E : sn) { suggestions.push_back(quoted(E)); } } |
