mirror of
https://github.com/godotengine/godot.git
synced 2025-10-20 00:13:30 +00:00
Rename empty() to is_empty()
This commit is contained in:
parent
886571e0fc
commit
5b937d493f
289 changed files with 898 additions and 898 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue