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
70 changed files with 169 additions and 169 deletions

View File

@@ -230,7 +230,7 @@ String DirAccessWindows::get_current_dir(bool p_include_drive) const {
return cdir;
} else {
if (_get_root_string().is_empty()) {
int pos = cdir.find(":");
int pos = cdir.find_char(':');
if (pos != -1) {
return cdir.substr(pos + 1);
}
@@ -344,7 +344,7 @@ String DirAccessWindows::get_filesystem_type() const {
return "Network Share";
}
int unit_end = path.find(":");
int unit_end = path.find_char(':');
ERR_FAIL_COND_V(unit_end == -1, String());
String unit = path.substr(0, unit_end + 1) + "\\";

View File

@@ -64,7 +64,7 @@ bool FileAccessWindows::is_path_invalid(const String &p_path) {
// Check for invalid operating system file.
String fname = p_path.get_file().to_lower();
int dot = fname.find(".");
int dot = fname.find_char('.');
if (dot != -1) {
fname = fname.substr(0, dot);
}