diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2024-05-08 14:35:44 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2024-05-08 14:35:44 +0200 |
commit | a9a1d0a162ef6be57374519589c538205e65a7fc (patch) | |
tree | 1789441c8af84b396ca21892c332c0583abb9c48 /modules/mono/editor/bindings_generator.cpp | |
parent | 1d101329c96460a8b00a8dec5ff8808a589ee505 (diff) | |
parent | a0dbdcc3abbd3e6307c6e68d0e60f8c0fa31d576 (diff) | |
download | redot-engine-a9a1d0a162ef6be57374519589c538205e65a7fc.tar.gz |
Merge pull request #91619 from AThousandShips/find_improve
Replace `find` with `contains/has` where applicable
Diffstat (limited to 'modules/mono/editor/bindings_generator.cpp')
-rw-r--r-- | modules/mono/editor/bindings_generator.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/mono/editor/bindings_generator.cpp b/modules/mono/editor/bindings_generator.cpp index eb75f05a23..9a76a25639 100644 --- a/modules/mono/editor/bindings_generator.cpp +++ b/modules/mono/editor/bindings_generator.cpp @@ -873,7 +873,7 @@ void BindingsGenerator::_append_text_method(StringBuilder &p_output, const TypeI } void BindingsGenerator::_append_text_member(StringBuilder &p_output, const TypeInterface *p_target_itype, const StringName &p_target_cname, const String &p_link_target, const Vector<String> &p_link_target_parts) { - if (p_link_target.find("/") >= 0) { + if (p_link_target.contains("/")) { // Properties with '/' (slash) in the name are not declared in C#, so there is nothing to reference. _append_text_undeclared(p_output, p_link_target); } else if (!p_target_itype || !p_target_itype->is_object_type) { @@ -1154,7 +1154,7 @@ void BindingsGenerator::_append_xml_method(StringBuilder &p_xml_output, const Ty } void BindingsGenerator::_append_xml_member(StringBuilder &p_xml_output, const TypeInterface *p_target_itype, const StringName &p_target_cname, const String &p_link_target, const Vector<String> &p_link_target_parts) { - if (p_link_target.find("/") >= 0) { + if (p_link_target.contains("/")) { // Properties with '/' (slash) in the name are not declared in C#, so there is nothing to reference. _append_xml_undeclared(p_xml_output, p_link_target); } else if (!p_target_itype || !p_target_itype->is_object_type) { @@ -3654,7 +3654,7 @@ bool BindingsGenerator::_populate_object_type_interfaces() { continue; } - if (property.name.find("/") >= 0) { + if (property.name.contains("/")) { // Ignore properties with '/' (slash) in the name. These are only meant for use in the inspector. continue; } |