summaryrefslogtreecommitdiffstats
path: root/editor/editor_properties_array_dict.cpp
diff options
context:
space:
mode:
authorA Thousand Ships <96648715+AThousandShips@users.noreply.github.com>2024-11-16 18:52:15 +0100
committerA Thousand Ships <96648715+AThousandShips@users.noreply.github.com>2024-11-17 10:02:18 +0100
commit68f638cf02cc595872c1a35b78cb1ce0039b1eef (patch)
tree311896361f77ee440b3bfd4c5b2f19f344f88333 /editor/editor_properties_array_dict.cpp
parent5efd124ca10bf46df62fa2441d80589777e54a5a (diff)
downloadredot-engine-68f638cf02cc595872c1a35b78cb1ce0039b1eef.tar.gz
Use `(r)find_char` instead of `(r)find` for single characters
Diffstat (limited to 'editor/editor_properties_array_dict.cpp')
-rw-r--r--editor/editor_properties_array_dict.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/editor/editor_properties_array_dict.cpp b/editor/editor_properties_array_dict.cpp
index 4b4c02f49b..3cc3a0f7c2 100644
--- a/editor/editor_properties_array_dict.cpp
+++ b/editor/editor_properties_array_dict.cpp
@@ -740,10 +740,10 @@ void EditorPropertyArray::setup(Variant::Type p_array_type, const String &p_hint
// The format of p_hint_string is:
// subType/subTypeHint:nextSubtype ... etc.
if (!p_hint_string.is_empty()) {
- int hint_subtype_separator = p_hint_string.find(":");
+ int hint_subtype_separator = p_hint_string.find_char(':');
if (hint_subtype_separator >= 0) {
String subtype_string = p_hint_string.substr(0, hint_subtype_separator);
- int slash_pos = subtype_string.find("/");
+ int slash_pos = subtype_string.find_char('/');
if (slash_pos >= 0) {
subtype_hint = PropertyHint(subtype_string.substr(slash_pos + 1, subtype_string.size() - slash_pos - 1).to_int());
subtype_string = subtype_string.substr(0, slash_pos);
@@ -1006,10 +1006,10 @@ void EditorPropertyDictionary::setup(PropertyHint p_hint, const String &p_hint_s
PackedStringArray types = p_hint_string.split(";");
if (types.size() > 0 && !types[0].is_empty()) {
String key = types[0];
- int hint_key_subtype_separator = key.find(":");
+ int hint_key_subtype_separator = key.find_char(':');
if (hint_key_subtype_separator >= 0) {
String key_subtype_string = key.substr(0, hint_key_subtype_separator);
- int slash_pos = key_subtype_string.find("/");
+ int slash_pos = key_subtype_string.find_char('/');
if (slash_pos >= 0) {
key_subtype_hint = PropertyHint(key_subtype_string.substr(slash_pos + 1, key_subtype_string.size() - slash_pos - 1).to_int());
key_subtype_string = key_subtype_string.substr(0, slash_pos);
@@ -1025,10 +1025,10 @@ void EditorPropertyDictionary::setup(PropertyHint p_hint, const String &p_hint_s
}
if (types.size() > 1 && !types[1].is_empty()) {
String value = types[1];
- int hint_value_subtype_separator = value.find(":");
+ int hint_value_subtype_separator = value.find_char(':');
if (hint_value_subtype_separator >= 0) {
String value_subtype_string = value.substr(0, hint_value_subtype_separator);
- int slash_pos = value_subtype_string.find("/");
+ int slash_pos = value_subtype_string.find_char('/');
if (slash_pos >= 0) {
value_subtype_hint = PropertyHint(value_subtype_string.substr(slash_pos + 1, value_subtype_string.size() - slash_pos - 1).to_int());
value_subtype_string = value_subtype_string.substr(0, slash_pos);