You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Rename empty() to is_empty()
This commit is contained in:
@@ -147,7 +147,7 @@ Array GDScriptTextDocument::completion(const Dictionary &p_params) {
|
||||
List<ScriptCodeCompletionOption> options;
|
||||
GDScriptLanguageProtocol::get_singleton()->get_workspace()->completion(params, &options);
|
||||
|
||||
if (!options.empty()) {
|
||||
if (!options.is_empty()) {
|
||||
int i = 0;
|
||||
arr.resize(options.size());
|
||||
|
||||
@@ -257,7 +257,7 @@ Dictionary GDScriptTextDocument::resolve(const Dictionary &p_params) {
|
||||
|
||||
if ((item.kind == lsp::CompletionItemKind::Method || item.kind == lsp::CompletionItemKind::Function) && !item.label.ends_with("):")) {
|
||||
item.insertText = item.label + "(";
|
||||
if (symbol && symbol->children.empty()) {
|
||||
if (symbol && symbol->children.is_empty()) {
|
||||
item.insertText += ")";
|
||||
}
|
||||
} else if (item.kind == lsp::CompletionItemKind::Event) {
|
||||
@@ -341,7 +341,7 @@ Variant GDScriptTextDocument::declaration(const Dictionary &p_params) {
|
||||
params.load(p_params);
|
||||
List<const lsp::DocumentSymbol *> symbols;
|
||||
Array arr = this->find_symbols(params, symbols);
|
||||
if (arr.empty() && !symbols.empty() && !symbols.front()->get()->native_class.empty()) { // Find a native symbol
|
||||
if (arr.is_empty() && !symbols.is_empty() && !symbols.front()->get()->native_class.is_empty()) { // Find a native symbol
|
||||
const lsp::DocumentSymbol *symbol = symbols.front()->get();
|
||||
if (GDScriptLanguageProtocol::get_singleton()->is_goto_native_symbols_enabled()) {
|
||||
String id;
|
||||
@@ -425,7 +425,7 @@ Array GDScriptTextDocument::find_symbols(const lsp::TextDocumentPositionParams &
|
||||
GDScriptLanguageProtocol::get_singleton()->get_workspace()->resolve_related_symbols(p_location, list);
|
||||
for (List<const lsp::DocumentSymbol *>::Element *E = list.front(); E; E = E->next()) {
|
||||
if (const lsp::DocumentSymbol *s = E->get()) {
|
||||
if (!s->uri.empty()) {
|
||||
if (!s->uri.is_empty()) {
|
||||
lsp::Location location;
|
||||
location.uri = s->uri;
|
||||
location.range = s->range;
|
||||
|
||||
Reference in New Issue
Block a user