diff options
author | A Thousand Ships <96648715+AThousandShips@users.noreply.github.com> | 2024-11-16 18:52:15 +0100 |
---|---|---|
committer | A Thousand Ships <96648715+AThousandShips@users.noreply.github.com> | 2024-11-17 10:02:18 +0100 |
commit | 68f638cf02cc595872c1a35b78cb1ce0039b1eef (patch) | |
tree | 311896361f77ee440b3bfd4c5b2f19f344f88333 /drivers/windows | |
parent | 5efd124ca10bf46df62fa2441d80589777e54a5a (diff) | |
download | redot-engine-68f638cf02cc595872c1a35b78cb1ce0039b1eef.tar.gz |
Use `(r)find_char` instead of `(r)find` for single characters
Diffstat (limited to 'drivers/windows')
-rw-r--r-- | drivers/windows/dir_access_windows.cpp | 4 | ||||
-rw-r--r-- | drivers/windows/file_access_windows.cpp | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/drivers/windows/dir_access_windows.cpp b/drivers/windows/dir_access_windows.cpp index 24a26b56ef..3ddbde72c4 100644 --- a/drivers/windows/dir_access_windows.cpp +++ b/drivers/windows/dir_access_windows.cpp @@ -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) + "\\"; diff --git a/drivers/windows/file_access_windows.cpp b/drivers/windows/file_access_windows.cpp index 7d2247d41a..4a0e5e5f49 100644 --- a/drivers/windows/file_access_windows.cpp +++ b/drivers/windows/file_access_windows.cpp @@ -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); } |