Add String::replace_char(s) methods for performance and convenience

This commit is contained in:
A Thousand Ships 2024-05-28 12:15:00 +02:00
parent c374ce211c
commit 889410dcda
No known key found for this signature in database
GPG key ID: DEFC5A5B1306947D
67 changed files with 297 additions and 137 deletions

View file

@ -594,7 +594,7 @@ void EditorFileDialog::_action_pressed() {
} else if (mode == FILE_MODE_OPEN_ANY || mode == FILE_MODE_OPEN_DIR) {
String path = dir_access->get_current_dir();
path = path.replace("\\", "/");
path = path.replace_char('\\', '/');
for (int i = 0; i < item_list->get_item_count(); i++) {
if (item_list->is_selected(i)) {