mirror of
https://github.com/Redot-Engine/redot-engine.git
synced 2025-12-06 23:31:53 -05: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