diff options
Diffstat (limited to 'editor/create_dialog.cpp')
-rw-r--r-- | editor/create_dialog.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/editor/create_dialog.cpp b/editor/create_dialog.cpp index 921c03e8ad..6bf14df8a1 100644 --- a/editor/create_dialog.cpp +++ b/editor/create_dialog.cpp @@ -173,7 +173,7 @@ void CreateDialog::_update_search() { _configure_search_option_item(root, base_type, ClassDB::class_exists(base_type)); const String search_text = search_box->get_text(); - bool empty_search = search_text == ""; + bool empty_search = search_text.is_empty(); // Filter all candidate results. Vector<String> candidates; @@ -244,7 +244,7 @@ void CreateDialog::_configure_search_option_item(TreeItem *r_item, const String r_item->set_icon(0, EditorNode::get_singleton()->get_class_icon(p_type, icon_fallback)); } - if (search_box->get_text() != "") { + if (!search_box->get_text().is_empty()) { r_item->set_collapsed(false); } else { // Don't collapse the root node or an abstract node on the first tree level. @@ -322,7 +322,7 @@ void CreateDialog::_cleanup() { void CreateDialog::_confirmed() { String selected_item = get_selected_type(); - if (selected_item == String()) { + if (selected_item.is_empty()) { return; } @@ -642,7 +642,7 @@ void CreateDialog::_load_favorites_and_history() { while (!f->eof_reached()) { String l = f->get_line().strip_edges(); - if (l != String()) { + if (!l.is_empty()) { favorite_list.push_back(l); } } |