mirror of
https://github.com/godotengine/godot.git
synced 2025-10-26 19:24:18 +00:00
Improve usage of String.split() vs get_slice()
This commit is contained in:
parent
2753d333f6
commit
d61a337a70
17 changed files with 45 additions and 50 deletions
|
|
@ -773,9 +773,8 @@ const LSP::DocumentSymbol *GDScriptWorkspace::resolve_symbol(const LSP::TextDocu
|
|||
String path = get_file_path(p_doc_pos.textDocument.uri);
|
||||
if (const ExtendGDScriptParser *parser = get_parse_result(path)) {
|
||||
String symbol_identifier = p_symbol_name;
|
||||
Vector<String> identifier_parts = symbol_identifier.split("(");
|
||||
if (identifier_parts.size()) {
|
||||
symbol_identifier = identifier_parts[0];
|
||||
if (symbol_identifier.get_slice_count("(") > 0) {
|
||||
symbol_identifier = symbol_identifier.get_slicec('(', 0);
|
||||
}
|
||||
|
||||
LSP::Position pos = p_doc_pos.position;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue