You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-07 12:30:27 +00:00
Rename empty() to is_empty()
This commit is contained in:
@@ -810,7 +810,7 @@ void VisualScript::get_custom_signal_list(List<StringName> *r_custom_signals) co
|
||||
int VisualScript::get_available_id() const {
|
||||
int max_id = 0;
|
||||
for (Map<StringName, Function>::Element *E = functions.front(); E; E = E->next()) {
|
||||
if (E->get().nodes.empty()) {
|
||||
if (E->get().nodes.is_empty()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -1401,7 +1401,7 @@ Set<int> VisualScript::get_output_sequence_ports_connected(const String &edited_
|
||||
}
|
||||
|
||||
VisualScript::~VisualScript() {
|
||||
while (!functions.empty()) {
|
||||
while (!functions.is_empty()) {
|
||||
remove_function(functions.front()->key());
|
||||
}
|
||||
}
|
||||
@@ -1506,7 +1506,7 @@ void VisualScriptInstance::_dependency_step(VisualScriptNodeInstance *node, int
|
||||
|
||||
pass_stack[node->pass_idx] = p_pass;
|
||||
|
||||
if (!node->dependencies.empty()) {
|
||||
if (!node->dependencies.is_empty()) {
|
||||
int dc = node->dependencies.size();
|
||||
VisualScriptNodeInstance **deps = node->dependencies.ptrw();
|
||||
|
||||
@@ -1593,7 +1593,7 @@ Variant VisualScriptInstance::_call_internal(const StringName &p_method, void *p
|
||||
} else {
|
||||
//run dependencies first
|
||||
|
||||
if (!node->dependencies.empty()) {
|
||||
if (!node->dependencies.is_empty()) {
|
||||
int dc = node->dependencies.size();
|
||||
VisualScriptNodeInstance **deps = node->dependencies.ptrw();
|
||||
|
||||
|
||||
@@ -724,7 +724,7 @@ void VisualScriptEditor::_update_graph(int p_only_id) {
|
||||
line_edit->connect("text_changed", callable_mp(this, &VisualScriptEditor::_expression_text_changed), varray(E->get()));
|
||||
} else {
|
||||
String text = node->get_text();
|
||||
if (!text.empty()) {
|
||||
if (!text.is_empty()) {
|
||||
has_gnode_text = true;
|
||||
Label *label = memnew(Label);
|
||||
label->set_text(text);
|
||||
@@ -1723,7 +1723,7 @@ void VisualScriptEditor::_on_nodes_delete() {
|
||||
}
|
||||
}
|
||||
|
||||
if (to_erase.empty()) {
|
||||
if (to_erase.is_empty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1776,7 +1776,7 @@ void VisualScriptEditor::_on_nodes_duplicate() {
|
||||
}
|
||||
}
|
||||
|
||||
if (to_duplicate.empty()) {
|
||||
if (to_duplicate.is_empty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -2566,7 +2566,7 @@ String VisualScriptEditor::get_name() {
|
||||
if (script->get_path().find("local://") == -1 && script->get_path().find("::") == -1) {
|
||||
name = script->get_path().get_file();
|
||||
if (is_unsaved()) {
|
||||
if (script->get_path().empty()) {
|
||||
if (script->get_path().is_empty()) {
|
||||
name = TTR("[unsaved]");
|
||||
}
|
||||
name += "(*)";
|
||||
@@ -2588,7 +2588,7 @@ bool VisualScriptEditor::is_unsaved() {
|
||||
bool unsaved =
|
||||
script->is_edited() ||
|
||||
script->are_subnodes_edited() ||
|
||||
script->get_path().empty(); // In memory.
|
||||
script->get_path().is_empty(); // In memory.
|
||||
return unsaved;
|
||||
}
|
||||
|
||||
@@ -4183,7 +4183,7 @@ void VisualScriptEditor::_menu_option(int p_what) {
|
||||
}
|
||||
}
|
||||
|
||||
if (clipboard->nodes.empty()) {
|
||||
if (clipboard->nodes.is_empty()) {
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -4218,7 +4218,7 @@ void VisualScriptEditor::_menu_option(int p_what) {
|
||||
break;
|
||||
}
|
||||
|
||||
if (clipboard->nodes.empty()) {
|
||||
if (clipboard->nodes.is_empty()) {
|
||||
EditorNode::get_singleton()->show_warning(TTR("Clipboard is empty!"));
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -358,7 +358,7 @@ void VisualScriptPropertySelector::get_visual_node_names(const String &root_filt
|
||||
continue;
|
||||
}
|
||||
|
||||
bool in_modifier = p_modifiers.empty();
|
||||
bool in_modifier = p_modifiers.is_empty();
|
||||
for (Set<String>::Element *F = p_modifiers.front(); F && in_modifier; F = F->next()) {
|
||||
if (E->get().findn(F->get()) != -1) {
|
||||
in_modifier = true;
|
||||
|
||||
Reference in New Issue
Block a user