diff options
author | Rémi Verschelde <remi@verschelde.fr> | 2021-12-10 08:56:31 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-10 08:56:31 +0100 |
commit | bdf8340e5993ec3f86e4bf1d5ede48df7d023a12 (patch) | |
tree | 1e366583662397e366d4f84bb334660db37cb5bd /editor/connections_dialog.cpp | |
parent | 5ad9d8bad69309d71ea55f3d799af7e3711dc262 (diff) | |
parent | 49403cbfa0399bb4284ea5c36cc90216a0bda6ff (diff) |
Merge pull request #43181 from nathanfranke/string-empty
Replace String comparisons with "", String() to is_empty()
Diffstat (limited to 'editor/connections_dialog.cpp')
-rw-r--r-- | editor/connections_dialog.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/editor/connections_dialog.cpp b/editor/connections_dialog.cpp index 2088a7e1c4..4945414237 100644 --- a/editor/connections_dialog.cpp +++ b/editor/connections_dialog.cpp @@ -111,7 +111,7 @@ public: void ConnectDialog::ok_pressed() { String method_name = dst_method->get_text(); - if (method_name == "") { + if (method_name.is_empty()) { error->set_text(TTR("Method in target node must be specified.")); error->popup_centered(); return; @@ -234,7 +234,7 @@ void ConnectDialog::_add_bind() { */ void ConnectDialog::_remove_bind() { String st = bind_editor->get_selected_path(); - if (st == "") { + if (st.is_empty()) { return; } int idx = st.get_slice("/", 1).to_int() - 1; @@ -969,7 +969,7 @@ void ConnectionsDock::update_tree() { } else if (pi.type != Variant::NIL) { tname = Variant::get_type_name(pi.type); } - signaldesc += (pi.name == "" ? String("arg " + itos(i)) : pi.name) + ": " + tname; + signaldesc += (pi.name.is_empty() ? String("arg " + itos(i)) : pi.name) + ": " + tname; argnames.push_back(pi.name + ":" + tname); } } @@ -1001,7 +1001,7 @@ void ConnectionsDock::update_tree() { if (!found) { DocTools *dd = EditorHelp::get_doc_data(); Map<String, DocData::ClassDoc>::Element *F = dd->class_list.find(base); - while (F && descr == String()) { + while (F && descr.is_empty()) { for (int i = 0; i < F->get().signals.size(); i++) { if (F->get().signals[i].name == signal_name.operator String()) { descr = DTR(F->get().signals[i].description); |