mirror of
https://github.com/Redot-Engine/redot-engine.git
synced 2025-12-06 07:17:42 -05:00
Use (r)find_char instead of (r)find for single characters
This commit is contained in:
@@ -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) + "\\";
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user