You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-16 14:00:40 +00:00
Add String::replace_char(s) methods for performance and convenience
This commit is contained in:
@@ -1867,7 +1867,7 @@ bool EditorFileSystem::_find_file(const String &p_file, EditorFileSystemDirector
|
||||
return false;
|
||||
}
|
||||
f = f.substr(6);
|
||||
f = f.replace("\\", "/");
|
||||
f = f.replace_char('\\', '/');
|
||||
|
||||
Vector<String> path = f.split("/");
|
||||
|
||||
@@ -1993,7 +1993,7 @@ EditorFileSystemDirectory *EditorFileSystem::get_filesystem_path(const String &p
|
||||
}
|
||||
|
||||
f = f.substr(6);
|
||||
f = f.replace("\\", "/");
|
||||
f = f.replace_char('\\', '/');
|
||||
if (f.is_empty()) {
|
||||
return filesystem;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user