You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2026-01-04 19:21:46 +00:00
Use (r)find_char instead of (r)find for single characters
This commit is contained in:
@@ -212,7 +212,7 @@ String relative_to_impl(const String &p_path, const String &p_relative_to) {
|
||||
#ifdef WINDOWS_ENABLED
|
||||
String get_drive_letter(const String &p_norm_path) {
|
||||
int idx = p_norm_path.find(":/");
|
||||
if (idx != -1 && idx < p_norm_path.find("/")) {
|
||||
if (idx != -1 && idx < p_norm_path.find_char('/')) {
|
||||
return p_norm_path.substr(0, idx + 1);
|
||||
}
|
||||
return String();
|
||||
|
||||
Reference in New Issue
Block a user