mirror of
https://github.com/godotengine/godot.git
synced 2025-10-23 18:03:35 +00:00
Use const references where possible for List range iterators
This commit is contained in:
parent
a0f7f42b84
commit
ac3322b0af
171 changed files with 649 additions and 650 deletions
|
|
@ -119,7 +119,7 @@ const lsp::DocumentSymbol *GDScriptWorkspace::get_script_symbol(const String &p_
|
|||
void GDScriptWorkspace::reload_all_workspace_scripts() {
|
||||
List<String> paths;
|
||||
list_script_files("res://", paths);
|
||||
for (String &path : paths) {
|
||||
for (const String &path : paths) {
|
||||
Error err;
|
||||
String content = FileAccess::get_file_as_string(path, &err);
|
||||
ERR_CONTINUE(err != OK);
|
||||
|
|
@ -586,7 +586,7 @@ Error GDScriptWorkspace::resolve_signature(const lsp::TextDocumentPositionParams
|
|||
GDScriptLanguageProtocol::get_singleton()->get_workspace()->resolve_related_symbols(text_pos, symbols);
|
||||
}
|
||||
|
||||
for (const lsp::DocumentSymbol *symbol : symbols) {
|
||||
for (const lsp::DocumentSymbol *const &symbol : symbols) {
|
||||
if (symbol->kind == lsp::SymbolKind::Method || symbol->kind == lsp::SymbolKind::Function) {
|
||||
lsp::SignatureInformation signature_info;
|
||||
signature_info.label = symbol->detail;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue