diff options
Diffstat (limited to 'editor/editor_help_search.cpp')
-rw-r--r-- | editor/editor_help_search.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/editor/editor_help_search.cpp b/editor/editor_help_search.cpp index 578e21861e..bf7280dfd0 100644 --- a/editor/editor_help_search.cpp +++ b/editor/editor_help_search.cpp @@ -161,7 +161,7 @@ void EditorHelpSearch::popup_dialog(const String &p_term) { popup_centered_ratio(0.5F); } - if (p_term == "") { + if (p_term.is_empty()) { search_box->clear(); } else { if (old_term == p_term) { @@ -331,7 +331,7 @@ bool EditorHelpSearch::Runner::_phase_match_classes() { // Match class name. if (search_flags & SEARCH_CLASSES) { - match.name = term == "" || _match_string(term, class_doc.name); + match.name = term.is_empty() || _match_string(term, class_doc.name); } // Match members if the term is long enough. @@ -513,7 +513,7 @@ TreeItem *EditorHelpSearch::Runner::_create_class_hierarchy(const ClassMatch &p_ // Ensure parent nodes are created first. TreeItem *parent = root_item; - if (p_match.doc->inherits != "") { + if (!p_match.doc->inherits.is_empty()) { if (class_items.has(p_match.doc->inherits)) { parent = class_items[p_match.doc->inherits]; } else { @@ -558,7 +558,7 @@ TreeItem *EditorHelpSearch::Runner::_create_method_item(TreeItem *p_parent, cons for (int i = 0; i < p_doc->arguments.size(); i++) { const DocData::ArgumentDoc &arg = p_doc->arguments[i]; tooltip += arg.type + " " + arg.name; - if (arg.default_value != "") { + if (!arg.default_value.is_empty()) { tooltip += " = " + arg.default_value; } if (i < p_doc->arguments.size() - 1) { @@ -574,7 +574,7 @@ TreeItem *EditorHelpSearch::Runner::_create_signal_item(TreeItem *p_parent, cons for (int i = 0; i < p_doc->arguments.size(); i++) { const DocData::ArgumentDoc &arg = p_doc->arguments[i]; tooltip += arg.type + " " + arg.name; - if (arg.default_value != "") { + if (!arg.default_value.is_empty()) { tooltip += " = " + arg.default_value; } if (i < p_doc->arguments.size() - 1) { |