Use (r)find_char instead of (r)find for single characters

This commit is contained in:
A Thousand Ships 2024-11-16 18:52:15 +01:00
parent 5efd124ca1
commit 68f638cf02
No known key found for this signature in database
GPG key ID: 2033189A662F8BD7
70 changed files with 169 additions and 169 deletions

View file

@ -80,7 +80,7 @@ static bool _get_blender_version(const String &p_path, int &r_major, int &r_mino
}
pipe = pipe.substr(bl);
pipe = pipe.replace_first("Blender ", "");
int pp = pipe.find(".");
int pp = pipe.find_char('.');
if (pp == -1) {
if (r_err) {
*r_err = vformat(TTR("Couldn't extract version information from Blender executable at: %s."), p_path);
@ -96,7 +96,7 @@ static bool _get_blender_version(const String &p_path, int &r_major, int &r_mino
return false;
}
int pp2 = pipe.find(".", pp + 1);
int pp2 = pipe.find_char('.', pp + 1);
r_minor = pp2 > pp ? pipe.substr(pp + 1, pp2 - pp - 1).to_int() : 0;
return true;

View file

@ -689,7 +689,7 @@ void GLTFDocument::_compute_node_heights(Ref<GLTFState> p_state) {
}
static Vector<uint8_t> _parse_base64_uri(const String &p_uri) {
int start = p_uri.find(",");
int start = p_uri.find_char(',');
ERR_FAIL_COND_V(start == -1, Vector<uint8_t>());
CharString substr = p_uri.substr(start + 1).ascii();