mirror of
https://github.com/godotengine/godot.git
synced 2026-01-03 18:11:19 +03:00
Skip copying values constructed immediately before returning
This commit is contained in:
@@ -885,8 +885,8 @@ const Array &ExtendGDScriptParser::get_member_completions() {
|
||||
}
|
||||
|
||||
Dictionary ExtendGDScriptParser::dump_function_api(const GDScriptParser::FunctionNode *p_func) const {
|
||||
ERR_FAIL_NULL_V(p_func, Dictionary());
|
||||
Dictionary func;
|
||||
ERR_FAIL_NULL_V(p_func, func);
|
||||
func["name"] = p_func->identifier->name;
|
||||
func["return_type"] = p_func->get_datatype().to_string();
|
||||
func["rpc_config"] = p_func->rpc_config;
|
||||
@@ -909,10 +909,9 @@ Dictionary ExtendGDScriptParser::dump_function_api(const GDScriptParser::Functio
|
||||
}
|
||||
|
||||
Dictionary ExtendGDScriptParser::dump_class_api(const GDScriptParser::ClassNode *p_class) const {
|
||||
ERR_FAIL_NULL_V(p_class, Dictionary());
|
||||
Dictionary class_api;
|
||||
|
||||
ERR_FAIL_NULL_V(p_class, class_api);
|
||||
|
||||
class_api["name"] = p_class->identifier != nullptr ? String(p_class->identifier->name) : String();
|
||||
class_api["path"] = path;
|
||||
Array extends_class;
|
||||
|
||||
@@ -355,13 +355,11 @@ Dictionary GDScriptTextDocument::resolve(const Dictionary &p_params) {
|
||||
}
|
||||
|
||||
Array GDScriptTextDocument::foldingRange(const Dictionary &p_params) {
|
||||
Array arr;
|
||||
return arr;
|
||||
return Array();
|
||||
}
|
||||
|
||||
Array GDScriptTextDocument::codeLens(const Dictionary &p_params) {
|
||||
Array arr;
|
||||
return arr;
|
||||
return Array();
|
||||
}
|
||||
|
||||
Array GDScriptTextDocument::documentLink(const Dictionary &p_params) {
|
||||
@@ -379,8 +377,7 @@ Array GDScriptTextDocument::documentLink(const Dictionary &p_params) {
|
||||
}
|
||||
|
||||
Array GDScriptTextDocument::colorPresentation(const Dictionary &p_params) {
|
||||
Array arr;
|
||||
return arr;
|
||||
return Array();
|
||||
}
|
||||
|
||||
Variant GDScriptTextDocument::hover(const Dictionary &p_params) {
|
||||
@@ -416,8 +413,7 @@ Array GDScriptTextDocument::definition(const Dictionary &p_params) {
|
||||
LSP::TextDocumentPositionParams params;
|
||||
params.load(p_params);
|
||||
List<const LSP::DocumentSymbol *> symbols;
|
||||
Array arr = find_symbols(params, symbols);
|
||||
return arr;
|
||||
return find_symbols(params, symbols);
|
||||
}
|
||||
|
||||
Variant GDScriptTextDocument::declaration(const Dictionary &p_params) {
|
||||
|
||||
@@ -575,8 +575,7 @@ struct SaveOptions {
|
||||
*/
|
||||
struct ColorProviderOptions {
|
||||
Dictionary to_json() {
|
||||
Dictionary dict;
|
||||
return dict;
|
||||
return Dictionary();
|
||||
}
|
||||
};
|
||||
|
||||
@@ -585,8 +584,7 @@ struct ColorProviderOptions {
|
||||
*/
|
||||
struct FoldingRangeProviderOptions {
|
||||
Dictionary to_json() {
|
||||
Dictionary dict;
|
||||
return dict;
|
||||
return Dictionary();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user