@@ -81,7 +81,7 @@ void EditorHelp::_class_desc_select(const String &p_select) {
81
81
if (p_select.begins_with("$")) { //enum
82
82
String select = p_select.substr(1, p_select.length());
83
83
String class_name;
84
- if (select.find (".") != -1 ) {
84
+ if (select.contains (".")) {
85
85
class_name = select.get_slice(".", 0);
86
86
select = select.get_slice(".", 1);
87
87
} else {
@@ -123,7 +123,7 @@ void EditorHelp::_class_desc_select(const String &p_select) {
123
123
return;
124
124
}
125
125
126
- if (link.find (".") != -1 ) {
126
+ if (link.contains (".")) {
127
127
emit_signal(SNAME("go_to_help"), topic + ":" + link.get_slice(".", 0) + ":" + link.get_slice(".", 1));
128
128
} else {
129
129
if (table->has(link)) {
@@ -185,7 +185,7 @@ void EditorHelp::_add_type(const String &p_type, const String &p_enum) {
185
185
if (t.is_empty()) {
186
186
t = "void";
187
187
}
188
- bool can_ref = (t != "void" && t.find ("*") == -1 ) || !p_enum.is_empty();
188
+ bool can_ref = (t != "void" && !t.contains ("*")) || !p_enum.is_empty();
189
189
190
190
if (!p_enum.is_empty()) {
191
191
if (p_enum.get_slice_count(".") > 1) {
@@ -240,7 +240,7 @@ String EditorHelp::_fix_constant(const String &p_constant) const {
240
240
void EditorHelp::_add_method(const DocData::MethodDoc &p_method, bool p_overview) {
241
241
method_line[p_method.name] = class_desc->get_line_count() - 2; //gets overridden if description
242
242
243
- const bool is_vararg = p_method.qualifiers.find ("vararg") != -1 ;
243
+ const bool is_vararg = p_method.qualifiers.contains ("vararg");
244
244
245
245
if (p_overview) {
246
246
class_desc->push_cell();
@@ -364,7 +364,7 @@ void EditorHelp::_update_method_list(const Vector<DocData::MethodDoc> p_methods,
364
364
365
365
for (int i = 0; i < p_methods.size(); i++) {
366
366
const String &q = p_methods[i].qualifiers;
367
- if ((pass == 0 && q.find ("virtual") != -1 ) || (pass == 1 && q.find ("virtual") == -1 )) {
367
+ if ((pass == 0 && q.contains ("virtual")) || (pass == 1 && !q.contains ("virtual"))) {
368
368
m.push_back(p_methods[i]);
369
369
}
370
370
}
@@ -429,7 +429,7 @@ void EditorHelp::_update_method_descriptions(const DocData::ClassDoc p_classdoc,
429
429
430
430
for (int i = 0; i < p_methods.size(); i++) {
431
431
const String &q = p_methods[i].qualifiers;
432
- if ((pass == 0 && q.find ("virtual") != -1 ) || (pass == 1 && q.find ("virtual") == -1 )) {
432
+ if ((pass == 0 && q.contains ("virtual")) || (pass == 1 && !q.contains ("virtual"))) {
433
433
methods_filtered.push_back(p_methods[i]);
434
434
}
435
435
}
@@ -820,7 +820,7 @@ void EditorHelp::_update_doc() {
820
820
}
821
821
}
822
822
// Ignore undocumented non virtual private.
823
- if (cd.methods[i].name.begins_with("_") && cd.methods[i].description.is_empty() && cd.methods[i].qualifiers.find ("virtual") == -1 ) {
823
+ if (cd.methods[i].name.begins_with("_") && cd.methods[i].description.is_empty() && ! cd.methods[i].qualifiers.contains ("virtual")) {
824
824
continue;
825
825
}
826
826
methods.push_back(cd.methods[i]);
@@ -1923,7 +1923,7 @@ void EditorHelpBit::_meta_clicked(String p_select) {
1923
1923
1924
1924
String select = p_select.substr(1, p_select.length());
1925
1925
String class_name;
1926
- if (select.find (".") != -1 ) {
1926
+ if (select.contains (".")) {
1927
1927
class_name = select.get_slice(".", 0);
1928
1928
} else {
1929
1929
class_name = "@Global";
@@ -1936,7 +1936,7 @@ void EditorHelpBit::_meta_clicked(String p_select) {
1936
1936
} else if (p_select.begins_with("@")) {
1937
1937
String m = p_select.substr(1, p_select.length());
1938
1938
1939
- if (m.find (".") != -1 ) {
1939
+ if (m.contains (".")) {
1940
1940
_go_to_help("class_method:" + m.get_slice(".", 0) + ":" + m.get_slice(".", 0)); //must go somewhere else
1941
1941
}
1942
1942
}
0 commit comments