summaryrefslogtreecommitdiff
path: root/editor/editor_help_search.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/editor_help_search.cpp')
-rw-r--r--editor/editor_help_search.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/editor/editor_help_search.cpp b/editor/editor_help_search.cpp
index 578e21861e..19da6686a5 100644
--- a/editor/editor_help_search.cpp
+++ b/editor/editor_help_search.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */
+/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -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) {